[NETFILTER 05/6]: nf_queue: fix end-of-list check

Patrick McHardy kaber at trash.net
Sat Feb 25 14:18:38 CET 2006


[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 <kaber at trash.net>

---
commit 37fcebcd2adf3cd2124437ff1fb7836be0a9c207
tree a0a6c39916362c4b1f7125282d66d97c67a397fa
parent 021fe2cbea0df98012b8c96e55855622f885817d
author Patrick McHardy <kaber at trash.net> Sat, 25 Feb 2006 13:43:47 +0100
committer Patrick McHardy <kaber at trash.net> Sat, 25 Feb 2006 13:43:47 +0100

 net/netfilter/nf_queue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index 913df7d..d9f0d7e 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -214,7 +214,7 @@ void nf_reinject(struct sk_buff *skb, st
   			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__);



More information about the netfilter-devel mailing list