Commit 1758ee0ea26561943813c5f5a7b27272f2cbc4cf

Authored by Harald Welte
Committed by Arnaldo Carvalho de Melo
1 parent 433a4d3b54

[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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/netfilter/nf_queue.c
... ... @@ -117,7 +117,7 @@
117 117  
118 118 /* QUEUE == DROP if noone is waiting, to be safe. */
119 119 read_lock(&queue_handler_lock);
120   - if (!queue_handler[pf]->outfn) {
  120 + if (!queue_handler[pf] || !queue_handler[pf]->outfn) {
121 121 read_unlock(&queue_handler_lock);
122 122 kfree_skb(*skb);
123 123 return 1;