All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH FIX] NFQUEUE: fix --queue-bypass regression
@ 2013-10-28 13:42 Holger Eitzenberger
  2013-10-29 12:02 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Eitzenberger @ 2013-10-28 13:42 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel, Florian Westphal

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

Hi Pablo,

Florian reported a regression when using the --queue-bypass with v3 of
the target.

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

The attached patch fixes that for me.

 /Holger


[-- Attachment #2: nfqueue-fix-bypass.diff --]
[-- Type: text/x-diff, Size: 1068 bytes --]

[27428] NFQUEUE: fix bypass on v3

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 8746ddcf12bb26 ("netfilter: xt_NFQUEUE:
introduce CPU fanout").

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>

Index: net-next/net/netfilter/xt_NFQUEUE.c
===================================================================
--- net-next.orig/net/netfilter/xt_NFQUEUE.c
+++ net-next/net/netfilter/xt_NFQUEUE.c
@@ -147,6 +147,7 @@ nfqueue_tg_v3(struct sk_buff *skb, const
 {
 	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) {
@@ -157,7 +158,11 @@ nfqueue_tg_v3(struct sk_buff *skb, const
 			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 = {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH FIX] NFQUEUE: fix --queue-bypass regression
  2013-10-28 13:42 [PATCH FIX] NFQUEUE: fix --queue-bypass regression Holger Eitzenberger
@ 2013-10-29 12:02 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2013-10-29 12:02 UTC (permalink / raw)
  To: netfilter-devel, Florian Westphal

On Mon, Oct 28, 2013 at 02:42:33PM +0100, Holger Eitzenberger wrote:
> Hi Pablo,
> 
> Florian reported a regression when using the --queue-bypass with v3 of
> the target.
> 
> Regression is in since 8746ddcf12bb26 ("netfilter: xt_NFQUEUE:
> introduce CPU fanout").
> 
> The attached patch fixes that for me.

Applied, thanks Holger.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-29 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-28 13:42 [PATCH FIX] NFQUEUE: fix --queue-bypass regression Holger Eitzenberger
2013-10-29 12:02 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.