/* Description: Add a new address entry into the unlabeled connection hash table using the interface entry specified by @iface. On success zero is returned, otherwise a negative value is returned. The caller is responsible for calling the rcu_read_lock() functions.  */
static int netlbl_unlhsh_add_addr4(struct netlbl_unlhsh_iface *iface, const struct in_addr *addr, const struct in_addr *mask, u32 secid)
/* Description: Add a new address entry into the unlabeled connection hash table using the interface entry specified by @iface. On success zero is returned, otherwise a negative value is returned. The caller is responsible for calling the rcu_read_lock() functions.  */
static int netlbl_unlhsh_add_addr4(struct netlbl_unlhsh_iface *iface, const struct in_addr *addr, const struct in_addr *mask, u32 secid)
{
	int ret_val;
	struct netlbl_unlhsh_addr4 *entry;
	entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
	if (entry == NULL)
		return -ENOMEM;
	entry->list.addr = addr->s_addr & mask->s_addr;
	entry->list.mask = mask->s_addr;
	entry->list.valid = 1;
	INIT_RCU_HEAD(&entry->rcu);
	entry->secid = secid;
	spin_lock(&netlbl_unlhsh_lock);
	ret_val = netlbl_af4list_add(&entry->list, &iface->addr4_list);
	spin_unlock(&netlbl_unlhsh_lock);
	if (ret_val != 0)
		kfree(entry);
	return ret_val;
}