]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 23 Mar 2020 18:53:10 +0000 (19:53 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Mar 2020 18:59:39 +0000 (19:59 +0100)
commited7040a300fa33f4d5f93c60f5162e5dc0cf216d
treeacaaa372a2eb4f6e37dc4d10006ba2e3d1f16c38
parentd450cab106a5eef2393d62e7e4971c6e909d80e3
netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress

Set skb->tc_redirected to 1, otherwise the ifb driver drops the packet.
Set skb->tc_from_ingress to 1 to reinject the packet back to the ingress
path after leaving the ifb egress path.

This patch inconditionally sets on these two skb fields that are
meaningful to the ifb driver. The existing forward action is guaranteed
to run from ingress path.

Fixes: 5c9c1ea6942d ("netfilter: nf_tables: add forward expression to the netdev family")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_fwd_netdev.c