Skip to content

Commit 1758ee0

Browse files
laf0rgeArnaldo Carvalho de Melo
authored andcommitted
[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 <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 433a4d3 commit 1758ee0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ int nf_queue(struct sk_buff **skb,
117117

118118
/* QUEUE == DROP if noone is waiting, to be safe. */
119119
read_lock(&queue_handler_lock);
120-
if (!queue_handler[pf]->outfn) {
120+
if (!queue_handler[pf] || !queue_handler[pf]->outfn) {
121121
read_unlock(&queue_handler_lock);
122122
kfree_skb(*skb);
123123
return 1;

0 commit comments

Comments
 (0)