Skip to content

Commit

Permalink
netfilter: xt_NFQUEUE: fix --queue-bypass regression
Browse files Browse the repository at this point in the history
V3 of the NFQUEUE target ignores the --queue-bypass flag,
causing packets to be dropped when the userspace listener
isn't running.

Regression is in since 8746ddc ("netfilter: xt_NFQUEUE:
introduce CPU fanout").

Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Holger Eitzenberger authored and Pablo Neira Ayuso committed Oct 29, 2013
1 parent fecda03 commit d954777
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/netfilter/xt_NFQUEUE.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ nfqueue_tg_v3(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct xt_NFQ_info_v3 *info = par->targinfo;
u32 queue = info->queuenum;
int ret;

if (info->queues_total > 1) {
if (info->flags & NFQ_FLAG_CPU_FANOUT) {
Expand All @@ -157,7 +158,11 @@ nfqueue_tg_v3(struct sk_buff *skb, const struct xt_action_param *par)
queue = nfqueue_hash(skb, par);
}

return NF_QUEUE_NR(queue);
ret = NF_QUEUE_NR(queue);
if (info->flags & NFQ_FLAG_BYPASS)
ret |= NF_VERDICT_FLAG_QUEUE_BYPASS;

return ret;
}

static struct xt_target nfqueue_tg_reg[] __read_mostly = {
Expand Down

0 comments on commit d954777

Please sign in to comment.