Skip to content

Commit

Permalink
[NETFILTER]: nf_queue: fix end-of-list check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Feb 27, 2006
1 parent e121e9e commit 45fe4dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down

0 comments on commit 45fe4dc

Please sign in to comment.