From: Harald Welte Date: Thu, 3 Nov 2005 19:03:24 +0000 (+0100) Subject: [NETFILTER] nf_queue: Fix Ooops when no queue handler registered X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/acme/net-2.6.git;a=commitdiff;h=1758ee0ea26561943813c5f5a7b27272f2cbc4cf [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 Signed-off-by: Arnaldo Carvalho de Melo --- --- 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;