linux-stable/net/ipv6
Martin KaFai Lau 335c8cf3b5 net: ipv6: Handle delivery_time in ipv6 defrag
A latter patch will postpone the delivery_time clearing until the stack
knows the skb is being delivered locally (i.e. calling
skb_clear_delivery_time() at ip_local_deliver_finish() for IPv4
and at ip6_input_finish() for IPv6).  That will allow other kernel
forwarding path (e.g. ip[6]_forward) to keep the delivery_time also.

A very similar IPv6 defrag codes have been duplicated in
multiple places: regular IPv6, nf_conntrack, and 6lowpan.

Unlike the IPv4 defrag which is done before ip_local_deliver_finish(),
the regular IPv6 defrag is done after ip6_input_finish().
Thus, no change should be needed in the regular IPv6 defrag
logic because skb_clear_delivery_time() should have been called.

6lowpan also does not need special handling on delivery_time
because it is a non-inet packet_type.

However, cf_conntrack has a case in NF_INET_PRE_ROUTING that needs
to do the IPv6 defrag earlier.  Thus, it needs to save the
mono_delivery_time bit in the inet_frag_queue which is similar
to how it is handled in the previous patch for the IPv4 defrag.

This patch chooses to do it consistently and stores the mono_delivery_time
in the inet_frag_queue for all cases such that it will be easier
for the future refactoring effort on the IPv6 reasm code.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-03-03 14:38:48 +00:00
..
ila net: ipv6: check return value of rhashtable_init 2021-09-28 12:59:24 +01:00
netfilter net: ipv6: Handle delivery_time in ipv6 defrag 2022-03-03 14:38:48 +00:00
addrconf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-24 17:54:25 -08:00
addrconf_core.c ipv6: add net device refcount tracker to struct inet6_dev 2021-12-06 16:05:11 -08:00
addrlabel.c
af_inet6.c ipv6: annotate some data-races around sk->sk_prot 2022-02-18 11:53:28 +00:00
ah6.c ipv6: ah6: use swap() to make code cleaner 2021-11-18 12:00:15 +00:00
anycast.c
calipso.c
datagram.c
esp6.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next 2022-01-06 11:54:20 +00:00
esp6_offload.c net: move gro definitions to include/net/gro.h 2021-11-16 13:16:54 +00:00
exthdrs.c ipv6: partially inline ipv6_fixup_options 2022-01-27 19:46:11 -08:00
exthdrs_core.c
exthdrs_offload.c
fib6_notifier.c
fib6_rules.c ipv6: change fib6_rules_net_exit() to batch mode 2022-02-08 20:41:34 -08:00
fou6.c
icmp.c ipv6: do not use per netns icmp sockets 2022-01-25 11:25:21 +00:00
inet6_connection_sock.c
inet6_hashtables.c tcp: Don't acquire inet_listen_hashbucket::lock with disabled BH. 2022-02-09 21:28:36 -08:00
ioam6.c ipv6: ioam: Support for Queue depth data field 2022-01-02 12:15:13 +00:00
ioam6_iptunnel.c ipv6: ioam: Insertion frequency in lwtunnel output 2022-02-04 20:24:45 -08:00
ip6_checksum.c
ip6_fib.c ipv6: annotate accesses to fn->fn_sernum 2022-01-20 20:18:37 -08:00
ip6_flowlabel.c ipv6: per-netns exclusive flowlabel checks 2022-02-16 20:37:47 -08:00
ip6_gre.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-01-09 17:00:17 -08:00
ip6_icmp.c
ip6_input.c ipv6: make mc_forwarding atomic 2022-02-05 15:20:34 +00:00
ip6_offload.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-24 17:54:25 -08:00
ip6_offload.h
ip6_output.c net: Add skb_clear_tstamp() to keep the mono delivery_time 2022-03-03 14:38:48 +00:00
ip6_tunnel.c ip6_tunnel: fix possible NULL deref in ip6_tnl_xmit 2022-02-09 11:56:19 +00:00
ip6_udp_tunnel.c
ip6_vti.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-30 12:12:12 -08:00
ip6mr.c net: ip6mr: add support for passing full packet on wrong mif 2022-02-19 16:05:54 +00:00
ipcomp6.c xfrm: remove hdr_offset indirection 2021-06-11 14:48:50 +02:00
ipv6_sockglue.c ipv6: annotate some data-races around sk->sk_prot 2022-02-18 11:53:28 +00:00
Kconfig ipv6: ioam: Add support for the ip6ip6 encapsulation 2021-10-04 12:53:35 +01:00
Makefile net: ipv6: use ipv6-y directly instead of ipv6-objs 2021-09-28 13:13:40 +01:00
mcast.c ipv6: mcast: use rcu-safe version of ipv6_get_lladdr() 2022-02-14 13:30:37 +00:00
mcast_snoop.c net: bridge: mcast: fix broken length + header check for MRDv6 Adv. 2021-04-27 14:02:06 -07:00
mip6.c xfrm: ipv6: move mip6_rthdr_offset into xfrm core 2021-06-11 14:48:50 +02:00
ndisc.c ipv6: separate ndisc_ns_create() from ndisc_send_ns() 2022-02-21 12:13:45 +00:00
netfilter.c net: Add skb->mono_delivery_time to distinguish mono delivery_time from (rcv) timestamp 2022-03-03 14:38:48 +00:00
output_core.c ipv6: use prandom_u32() for ID generation 2021-05-31 22:12:08 -07:00
ping.c net: ping6: support setting basic SOL_IPV6 options via cmsg 2022-02-17 14:22:09 +00:00
proc.c
protocol.c
raw.c ipv6: raw: check passed optlen before reading 2021-12-29 12:32:56 -08:00
reassembly.c net: ipv6: Handle delivery_time in ipv6 defrag 2022-03-03 14:38:48 +00:00
route.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-17 11:44:20 -08:00
rpl.c
rpl_iptunnel.c
seg6.c icmp: ICMPV6: Examine invoking packet for Segment Route Headers. 2022-01-04 12:17:35 +00:00
seg6_hmac.c net: ipv6: check return value of rhashtable_init 2021-09-28 12:59:24 +01:00
seg6_iptunnel.c seg6: fix the iif in the IPv6 socket control block 2021-12-09 07:55:42 -08:00
seg6_local.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-01-05 14:36:10 -08:00
sit.c sit: allow encapsulated IPv6 traffic to be delivered locally 2022-01-12 13:56:07 -08:00
syncookies.c net: align static siphash keys 2021-11-16 19:07:54 -08:00
sysctl_net_ipv6.c ipv6: ioam: Data plane support for Pre-allocated Trace 2021-07-21 08:14:33 -07:00
tcp_ipv6.c net: Add skb->mono_delivery_time to distinguish mono delivery_time from (rcv) timestamp 2022-03-03 14:38:48 +00:00
tcpv6_offload.c net: move gro definitions to include/net/gro.h 2021-11-16 13:16:54 +00:00
tunnel6.c
udp.c ipv6: Add reasons for skb drops to __udp6_lib_rcv 2022-02-14 11:24:39 +00:00
udp_impl.h
udp_offload.c gro: remove rcu_read_lock/rcu_read_unlock from gro_receive handlers 2021-11-24 17:21:42 -08:00
udplite.c
xfrm6_input.c
xfrm6_output.c net: ipv6: fix return value of ip6_skb_dst_mtu 2021-07-02 11:57:01 -07:00
xfrm6_policy.c ipv6: get rid of net->ipv6.rt6_stats->fib_rt_uncache 2022-02-11 11:44:27 +00:00
xfrm6_protocol.c
xfrm6_state.c
xfrm6_tunnel.c xfrm: remove description from xfrm_type struct 2021-06-09 09:38:52 +02:00