diff options
author | Harald Welte <laforge@netfilter.org> | 2005-11-03 14:03:24 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-11-05 13:43:29 -0500 |
commit | 1758ee0ea26561943813c5f5a7b27272f2cbc4cf (patch) | |
tree | 2190113eca8ec18da862a25fc589f5d8cf678a0b /net | |
parent | 433a4d3b5456dec5bcca5a0f236bf622da1267b3 (diff) |
[NETFILTER] nf_queue: Fix Ooops when no queue handler registered
With the new nf_queue generalization in 2.6.14, we've introduced a bug
that causes an oops as soon as a packet is queued but no queue handler
registered. This patch fixes it.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net')
-rw-r--r-- | 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 d10d552d9c40..d3a4f30a7f22 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
@@ -117,7 +117,7 @@ int nf_queue(struct sk_buff **skb, | |||
117 | 117 | ||
118 | /* QUEUE == DROP if noone is waiting, to be safe. */ | 118 | /* QUEUE == DROP if noone is waiting, to be safe. */ |
119 | read_lock(&queue_handler_lock); | 119 | read_lock(&queue_handler_lock); |
120 | if (!queue_handler[pf]->outfn) { | 120 | if (!queue_handler[pf] || !queue_handler[pf]->outfn) { |
121 | read_unlock(&queue_handler_lock); | 121 | read_unlock(&queue_handler_lock); |
122 | kfree_skb(*skb); | 122 | kfree_skb(*skb); |
123 | return 1; | 123 | return 1; |