From: Patrick McHardy Date: Mon, 27 Feb 2006 21:03:55 +0000 (-0800) Subject: [NETFILTER]: nf_queue: fix end-of-list check X-Git-Tag: v2.6.16-rc6~163^2~2 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=45fe4dc08cbf9510074b97a16606366c1d405f4d;p=linux-2.6-omap-h63xx.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 913df7dcbad..d9f0d7ef103 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__);