]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:00:17 +0000 (11:00 +0200)
commit7957106ce3b50d2c2abc36d7225d42117eaf6d7b
tree88a42e8acfbe1997c0343d1cc1579aa62c5be131
parent7edb2cefd3d12b47761051fc8eb6a7ebee9f191c
netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress

commit bcfabee1afd99484b6ba067361b8678e28bbc065 upstream.

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: 39e6dea28adc ("netfilter: nf_tables: add forward expression to the netdev family")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_fwd_netdev.c