Skip to contentSkip to conversation

netfilter: ingress: fix wrong input interface on hook

PATCH New Pablo Neira Ayuso 1 participant 1 message Nov 6, 2015 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: ingress: fix wrong input interface on hook

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

---
 include/linux/netfilter_ingress.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/netfilter_ingress.h +2 -2
index 187feab..f06fcf17 100644
@@ -16,8 +16,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);
 }
 
Signature · 1 line
2.1.4