All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 02/10] netfilter: ingress: fix wrong input interface on hook
Date: Wed, 11 Nov 2015 18:33:35 +0100	[thread overview]
Message-ID: <1447263223-22662-3-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1447263223-22662-1-git-send-email-pablo@netfilter.org>

The input and output interfaces in nf_hook_state_init() are flipped.
This fixes iif matching on nftables.

Reported-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 include/linux/netfilter_ingress.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/netfilter_ingress.h b/include/linux/netfilter_ingress.h
index ba7ce88..5fcd375 100644
--- a/include/linux/netfilter_ingress.h
+++ b/include/linux/netfilter_ingress.h
@@ -19,8 +19,8 @@ static inline int nf_hook_ingress(struct sk_buff *skb)
 	struct nf_hook_state state;
 
 	nf_hook_state_init(&state, &skb->dev->nf_hooks_ingress,
-			   NF_NETDEV_INGRESS, INT_MIN, NFPROTO_NETDEV, NULL,
-			   skb->dev, NULL, dev_net(skb->dev), NULL);
+			   NF_NETDEV_INGRESS, INT_MIN, NFPROTO_NETDEV,
+			   skb->dev, NULL, NULL, dev_net(skb->dev), NULL);
 	return nf_hook_slow(skb, &state);
 }
 
-- 
2.1.4


  parent reply	other threads:[~2015-11-11 17:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 17:33 [PATCH 00/10] Netfilter fixes for net Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 01/10] netfilter: ingress: don't use nf_hook_list_active Pablo Neira Ayuso
2015-11-11 17:33 ` Pablo Neira Ayuso [this message]
2015-11-11 17:33 ` [PATCH 03/10] netfilter: ipset: Fix extension alignment Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 04/10] netfilter: ipset: Fix hash:* type expiration Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 05/10] netfilter: ipset: Fix hash type expire: release empty hash bucket block Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 06/10] netfilter: Fix removal of GRE expectation entries created by PPTP Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 07/10] netfilter: nfnetlink_log: work around uninitialized variable warning Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 08/10] netfilter: fix xt_TEE and xt_TPROXY dependencies Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 09/10] net: add __netdev_alloc_pcpu_stats() to indicate gfp flags Pablo Neira Ayuso
2015-11-11 17:33 ` [PATCH 10/10] netfilter: nf_tables: add clone interface to expression operations Pablo Neira Ayuso
2015-11-12 19:20 ` [PATCH 00/10] Netfilter fixes for net David Miller
2015-11-13 17:58 ` Josh Boyer
2015-11-13 18:52   ` Jozsef Kadlecsik

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=1447263223-22662-3-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.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 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.