Skip to content

Commit

Permalink
[NETFILTER] nf_queue: Fix Ooops when no queue handler registered
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Harald Welte authored and Arnaldo Carvalho de Melo committed Nov 5, 2005
1 parent 433a4d3 commit 1758ee0
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 @@ -117,7 +117,7 @@ int nf_queue(struct sk_buff **skb,

/* QUEUE == DROP if noone is waiting, to be safe. */
read_lock(&queue_handler_lock);
if (!queue_handler[pf]->outfn) {
if (!queue_handler[pf] || !queue_handler[pf]->outfn) {
read_unlock(&queue_handler_lock);
kfree_skb(*skb);
return 1;
Expand Down

0 comments on commit 1758ee0

Please sign in to comment.