]> err.no Git - linux-2.6/commitdiff
[NETFILTER] nf_queue: Fix Ooops when no queue handler registered
authorHarald Welte <laforge@netfilter.org>
Thu, 3 Nov 2005 19:03:24 +0000 (20:03 +0100)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Sat, 5 Nov 2005 18:43:29 +0000 (16:43 -0200)
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>
net/netfilter/nf_queue.c

index d10d552d9c40e2911aaf8cf796125c4212bdabff..d3a4f30a7f2247f0bac16cdc9466c31b12409e39 100644 (file)
@@ -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;