Skip to content

Commit b486598

Browse files
committed
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. Reported-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 61b590b commit b486598

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/netfilter_ingress.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ static inline int nf_hook_ingress(struct sk_buff *skb)
1919
struct nf_hook_state state;
2020

2121
nf_hook_state_init(&state, &skb->dev->nf_hooks_ingress,
22-
NF_NETDEV_INGRESS, INT_MIN, NFPROTO_NETDEV, NULL,
23-
skb->dev, NULL, dev_net(skb->dev), NULL);
22+
NF_NETDEV_INGRESS, INT_MIN, NFPROTO_NETDEV,
23+
skb->dev, NULL, NULL, dev_net(skb->dev), NULL);
2424
return nf_hook_slow(skb, &state);
2525
}
2626

0 commit comments

Comments
 (0)