Pārlūkot izejas kodu

[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@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy 19 gadi atpakaļ
vecāks
revīzija
45fe4dc08c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      net/netfilter/nf_queue.c

+ 1 - 1
net/netfilter/nf_queue.c

@@ -214,7 +214,7 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
   			break;
   			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. */
 		/* The module which sent it to userspace is gone. */
 		NFDEBUG("%s: module disappeared, dropping packet.\n",
 		NFDEBUG("%s: module disappeared, dropping packet.\n",
 			__FUNCTION__);
 			__FUNCTION__);