netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jagdish Motwani <j.k.motwani@gmail.com>
To: netdev@vger.kernel.org
Cc: j.k.motwani@gmail.com,
	Jagdish Motwani <jagdish.motwani@sophos.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	Florian Westphal <fw@strlen.de>,
	"David S. Miller" <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net] netfilter: nf_queue:fix reinject verdict handling
Date: Thu,  9 May 2019 00:01:14 +0530	[thread overview]
Message-ID: <20190508183114.7507-1-j.k.motwani@gmail.com> (raw)

From: Jagdish Motwani <jagdish.motwani@sophos.com>

In case of more than 1 nf_queues, hooks between them are being executed
more than once.

Signed-off-by: Jagdish Motwani <jagdish.motwani@sophos.com>
---
 net/netfilter/nf_queue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index 9dc1d6e..b5b2be5 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -255,6 +255,7 @@ static unsigned int nf_iterate(struct sk_buff *skb,
 repeat:
 		verdict = nf_hook_entry_hookfn(hook, skb, state);
 		if (verdict != NF_ACCEPT) {
+			*index = i;
 			if (verdict != NF_REPEAT)
 				return verdict;
 			goto repeat;
-- 
2.9.5


             reply	other threads:[~2019-05-08 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 18:31 Jagdish Motwani [this message]
2019-05-13  9:22 ` [PATCH net] netfilter: nf_queue:fix reinject verdict handling Pablo Neira Ayuso
2019-05-13 10:36   ` Jagdish Motwani
2019-05-13 10:40     ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190508183114.7507-1-j.k.motwani@gmail.com \
    --to=j.k.motwani@gmail.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=jagdish.motwani@sophos.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).