]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 25 Mar 2020 12:47:18 +0000 (13:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Mar 2020 19:24:33 +0000 (12:24 -0700)
commit778e061baf5a045bf308dd2f64524227f43c7fb1
tree205302addf1ab2a514791d141158e69c0d2e3fab
parentffc73881efb28548338312b21a65530910a710bb
net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build

net/netfilter/nft_fwd_netdev.c: In function ‘nft_fwd_netdev_eval’:
    net/netfilter/nft_fwd_netdev.c:32:10: error: ‘struct sk_buff’ has no member named ‘tc_redirected’
      pkt->skb->tc_redirected = 1;
              ^~
    net/netfilter/nft_fwd_netdev.c:33:10: error: ‘struct sk_buff’ has no member named ‘tc_from_ingress’
      pkt->skb->tc_from_ingress = 1;
              ^~

To avoid a direct dependency with tc actions from netfilter, wrap the
redirect bits around CONFIG_NET_REDIRECT and move helpers to
include/linux/skbuff.h. Turn on this toggle from the ifb driver, the
only existing client of these bits in the tree.

This patch adds skb_set_redirected() that sets on the redirected bit
on the skbuff, it specifies if the packet was redirect from ingress
and resets the timestamp (timestamp reset was originally missing in the
netfilter bugfix).

Fixes: ed7040a300fa33f4 ("netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress")
Reported-by: noreply@ellerman.id.au
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/Kconfig
drivers/net/ifb.c
drivers/net/wireguard/queueing.h
include/linux/skbuff.h
include/net/sch_generic.h
net/Kconfig
net/core/dev.c
net/core/pktgen.c
net/netfilter/nft_fwd_netdev.c
net/sched/act_mirred.c