From: Patrick McHardy Date: Mon, 27 Feb 2006 21:03:55 +0000 (-0800) Subject: [NETFILTER]: nf_queue: fix end-of-list check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=45fe4dc08cbf9510074b97a16606366c1d405f4d;p=openwrt%2Fstaging%2Fblogic.git [NETFILTER]: nf_queue: fix end-of-list check The comparison wants to find out if the last list iteration reached the end of the list. It needs to compare the iterator with the list head to do this, not the element it is looking for. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 913df7dcbada..d9f0d7ef103b 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -214,7 +214,7 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info, break; } - if (elem == &nf_hooks[info->pf][info->hook]) { + if (i == &nf_hooks[info->pf][info->hook]) { /* The module which sent it to userspace is gone. */ NFDEBUG("%s: module disappeared, dropping packet.\n", __FUNCTION__);