linux-stable/net/core
Pablo Neira Ayuso 2c64605b59 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: bcfabee1af ("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>
2020-03-25 12:24:33 -07:00
..
bpf_sk_storage.c bpf: Improve bucket_log calculation logic 2020-02-07 23:01:41 +01:00
datagram.c net: add queue argument to __skb_wait_for_more_packets and __skb_{,try_}recv_datagram 2019-12-09 09:59:07 +01:00
datagram.h
dev.c net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build 2020-03-25 12:24:33 -07:00
dev_addr_lists.c net: remove unnecessary variables and callback 2019-10-24 14:53:49 -07:00
dev_ioctl.c net: Introduce peer to peer one step PTP time stamping. 2019-12-25 19:51:34 -08:00
devlink.c devlink: validate length of region addr/len 2020-03-03 13:28:48 -08:00
drop_monitor.c drop_monitor: Do not cancel uninitialized work item 2020-02-07 18:48:36 +01:00
dst.c net: print proper warning on dst underflow 2019-09-26 09:05:56 +02:00
dst_cache.c
failover.c
fib_notifier.c net: fib_notifier: propagate extack down to the notifier block callback 2019-10-04 11:10:56 -07:00
fib_rules.c net: fib_rules: Correctly set table field when table number exceeds 8 bits 2020-02-16 18:38:24 -08:00
filter.c treewide: remove redundant IS_ERR() before error code check 2020-02-04 03:05:27 +00:00
flow_dissector.c flow_dissector: Fix to use new variables for port ranges in bpf hook 2020-01-27 11:25:07 +01:00
flow_offload.c net: core: rename indirect block ingress cb function 2019-12-06 20:45:09 -08:00
gen_estimator.c net_sched: gen_estimator: extend packet counter to 64bit 2019-11-06 21:51:36 -08:00
gen_stats.c net_sched: add TCA_STATS_PKT64 attribute 2019-11-05 18:20:55 -08:00
gro_cells.c
hwbm.c
link_watch.c
lwt_bpf.c net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2019-12-04 12:27:13 -08:00
lwtunnel.c
Makefile ethtool: move to its own directory 2019-12-12 17:07:05 -08:00
neighbour.c neigh_stat_seq_next() should increase position index 2020-01-24 11:42:18 +01:00
net-procfs.c net: procfs: use index hashlist instead of name hashlist 2019-10-01 14:47:19 -07:00
net-sysfs.c net-sysfs: Call dev_hold always in rx_queue_add_kobject 2019-12-17 22:57:11 -08:00
net-sysfs.h
net-traces.c
net_namespace.c netns: Constify exported functions 2020-01-17 13:25:24 +01:00
netclassid_cgroup.c cgroup, netclassid: periodically release file_lock on classid updating 2020-03-09 18:13:39 -07:00
netevent.c
netpoll.c net: fix skb use after free in netpoll 2019-08-27 20:52:02 -07:00
netprio_cgroup.c netprio: use css ID instead of cgroup ID 2019-11-12 08:18:03 -08:00
page_pool.c page_pool: refill page when alloc.count of pool is zero 2020-02-13 14:11:51 -08:00
pktgen.c net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build 2020-03-25 12:24:33 -07:00
ptp_classifier.c
request_sock.c tcp: add rcu protection around tp->fastopen_rsk 2019-10-13 10:13:08 -07:00
rtnetlink.c net: rtnetlink: fix bugs in rtnl_alt_ifname() 2020-02-16 18:51:59 -08:00
scm.c y2038: socket: remove timespec reference in timestamping 2019-11-15 14:38:29 +01:00
secure_seq.c
skbuff.c net: core: Distribute switch variables for initialization 2020-02-20 10:00:19 -08:00
skmsg.c net, sk_msg: Don't check if sock is locked when tearing down psock 2020-01-22 20:30:20 +01:00
sock.c net: memcg: late association of sock to memcg 2020-03-10 15:33:05 -07:00
sock_diag.c sock: make cookie generation global instead of per netns 2019-08-09 13:14:46 -07:00
sock_map.c bpf, sockmap: Remove bucket->lock from sock_{hash|map}_free 2020-03-11 14:08:52 +01:00
sock_reuseport.c soreuseport: Cleanup duplicate initialization of more_reuse->max_socks. 2020-01-27 11:01:16 +01:00
stream.c tcp: make sure EPOLLOUT wont be missed 2019-08-19 13:07:43 -07:00
sysctl_net_core.c net, sysctl: Fix compiler warning when only cBPF is present 2019-12-19 17:17:51 +01:00
timestamping.c net: Introduce a new MII time stamping interface. 2019-12-25 19:51:33 -08:00
tso.c
utils.c net: Fix skb->csum update in inet_proto_csum_replace16(). 2020-01-24 20:54:30 +01:00
xdp.c treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00