From: Harald Welte Date: Tue, 15 Nov 2005 12:32:36 +0000 (+0100) Subject: [PATCH] nf_queue: Fix Ooops when no queue handler registered X-Git-Tag: v2.6.14.3~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e7dfa8a64420eff76dfedda3f6fec170f0b4d8;p=thirdparty%2Fkernel%2Fstable.git [PATCH] 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 Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index d10d552d9c40e..d3a4f30a7f224 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -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;