/* Description: Searches the IPv4 address list given by @head. If a matching address entry is found it is returned, otherwise NULL is returned. The caller is responsible for calling the rcu_read_lock() functions.  */
struct netlbl_af4list* netlbl_af4list_search(__be32 addr, struct list_head *head)
/* Description: Searches the IPv4 address list given by @head. If a matching address entry is found it is returned, otherwise NULL is returned. The caller is responsible for calling the rcu_read_lock() functions.  */
struct netlbl_af4list* netlbl_af4list_search(__be32 addr, struct list_head *head)
{
	struct netlbl_af4list *iter;
	list_for_each_entry_rcu(iter, head, list)
		if (iter->valid && (addr & iter->mask) == iter->addr)
			return iter;
	return NULL;
}