]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: nf_queue: fix end-of-list check
authorPatrick McHardy <kaber@trash.net>
Mon, 27 Feb 2006 21:03:55 +0000 (13:03 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Feb 2006 21:03:55 +0000 (13:03 -0800)
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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_queue.c

index 913df7dcbada908f8a69b56c1a1c61b85f3f42d7..d9f0d7ef103b61f8209eaa9fd9aaa29306438309 100644 (file)
@@ -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__);