android_kernel_oneplus_msm8998/net/ipv4
Toke Høiland-Jørgensen cb66016b7b gso_segment: Reset skb->mac_len after modifying network header
[ Upstream commit c56cae23c6b167acc68043c683c4573b80cbcc2c ]

When splitting a GSO segment that consists of encapsulated packets, the
skb->mac_len of the segments can end up being set wrong, causing packet
drops in particular when using act_mirred and ifb interfaces in
combination with a qdisc that splits GSO packets.

This happens because at the time skb_segment() is called, network_header
will point to the inner header, throwing off the calculation in
skb_reset_mac_len(). The network_header is subsequently adjust by the
outer IP gso_segment handlers, but they don't set the mac_len.

Fix this by adding skb_reset_mac_len() calls to both the IPv4 and IPv6
gso_segment handlers, after they modify the network_header.

Many thanks to Eric Dumazet for his help in identifying the cause of
the bug.

Acked-by: Dave Taht <dave.taht@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-29 03:08:52 -07:00
..
netfilter netfilter: x_tables: set module owner for icmp(6) matches 2018-08-24 13:26:58 +02:00
af_inet.c gso_segment: Reset skb->mac_len after modifying network header 2018-09-29 03:08:52 -07:00
ah4.c ipsec: check return value of skb_to_sgvec always 2018-04-13 19:50:23 +02:00
arp.c arp: fix arp_filter on l3slave devices 2018-04-13 19:50:24 +02:00
cipso_ipv4.c Cipso: cipso_v4_optptr enter infinite loop 2018-09-05 09:18:33 +02:00
datagram.c
devinet.c ipv4: igmp: guard against silly MTU values 2018-01-02 20:33:24 +01:00
esp4.c ipsec: check return value of skb_to_sgvec always 2018-04-13 19:50:23 +02:00
fib_frontend.c ipv4: remove BUG_ON() from fib_compute_spec_dst 2018-08-06 16:24:40 +02:00
fib_lookup.h
fib_rules.c
fib_semantics.c ipv4: Fix error return value in fib_convert_metrics() 2018-07-11 16:03:47 +02:00
fib_trie.c net: Improve handling of failures on link and route dumps 2017-06-07 12:05:58 +02:00
fou.c net: add recursion limit to GRO 2016-11-15 07:46:38 +01:00
gre_demux.c
gre_offload.c net: add recursion limit to GRO 2016-11-15 07:46:38 +01:00
icmp.c
igmp.c net: igmp: add a missing rcu locking section 2018-02-16 20:09:37 +01:00
inet_connection_sock.c tcp/dccp: fix other lockdep splats accessing ireq_opt 2017-11-18 11:11:07 +01:00
inet_diag.c
inet_fragment.c inet: frag: enforce memory limits earlier 2018-08-06 16:24:41 +02:00
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c soreuseport: initialise timewait reuseport field 2018-05-16 10:06:50 +02:00
inetpeer.c
ip_forward.c
ip_fragment.c inet: frag: release spinlock before calling icmp_send() 2017-12-25 14:22:11 +01:00
ip_gre.c
ip_input.c
ip_options.c
ip_output.c ip: hash fragments consistently 2018-07-28 07:45:02 +02:00
ip_sockglue.c ip: in cmsg IP(V6)_ORIGDSTADDR call pskb_may_pull 2018-07-28 07:45:03 +02:00
ip_tunnel.c ip_tunnel: better validate user provided tunnel names 2018-04-13 19:50:26 +02:00
ip_tunnel_core.c tunnels: Remove encapsulation offloads on decap. 2016-10-31 04:13:59 -06:00
ip_vti.c Revert "vti4: Don't override MTU passed on link creation via IFLA_MTU" 2018-05-30 22:11:35 +02:00
ipcomp.c
ipconfig.c ipconfig: Correctly initialise ic_nameservers 2018-08-06 16:24:38 +02:00
ipip.c ipip: only increase err_count for some certain type icmp in ipip_err 2017-11-18 11:11:06 +01:00
ipmr.c ipmr, ip6mr: fix scheduling while atomic and a deadlock with ipmr_get_route 2016-11-15 07:46:37 +01:00
Kconfig ipv4+ipv6: Make INET*_ESP select CRYPTO_ECHAINIV 2018-08-15 17:42:05 +02:00
Makefile
netfilter.c netfilter: use skb_to_full_sk in ip_route_me_harder 2018-03-18 11:17:51 +01:00
ping.c ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg 2018-05-26 08:48:46 +02:00
proc.c
protocol.c
raw.c net: ipv4: fix for a race condition in raw_sendmsg 2018-01-02 20:33:25 +01:00
route.c ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu 2018-05-30 07:49:04 +02:00
syncookies.c tcp/dccp: fix ireq->opt races 2017-11-18 11:11:06 +01:00
sysctl_net_ipv4.c ipv4: Return EINVAL when ping_group_range sysctl doesn't map to user ns 2018-07-25 10:18:16 +02:00
tcp.c tcp: identify cryptic messages as TCP seq # bugs 2018-08-24 13:27:00 +02:00
tcp_bic.c
tcp_cdg.c
tcp_cong.c tcp: disallow cwnd undo when switching congestion control 2017-06-14 13:16:19 +02:00
tcp_cubic.c
tcp_dctcp.c tcp: remove DELAYED ACK events in DCTCP 2018-08-24 13:26:59 +02:00
tcp_diag.c
tcp_fastopen.c tcp: initialize max window for a new fastopen socket 2017-02-04 09:45:09 +01:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c net/tcp/illinois: replace broken algorithm reference link 2018-05-30 07:49:02 +02:00
tcp_input.c tcp: Fix missing range_truesize enlargement in the backport 2018-08-17 20:56:44 +02:00
tcp_ipv4.c tcp: verify the checksum of the first data segment in a new connection 2018-07-03 11:21:25 +02:00
tcp_lp.c tcp: fix wraparound issue in tcp_lp 2017-05-14 13:32:58 +02:00
tcp_memcontrol.c
tcp_metrics.c
tcp_minisocks.c tcp: do not restart timewait timer on rst reception 2018-09-15 09:40:37 +02:00
tcp_offload.c
tcp_output.c tcp: remove DELAYED ACK events in DCTCP 2018-08-24 13:26:59 +02:00
tcp_probe.c
tcp_recovery.c
tcp_scalable.c
tcp_timer.c net: tcp: close sock if net namespace is exiting 2018-01-31 12:06:14 +01:00
tcp_vegas.c tcp: fix under-evaluated ssthresh in TCP Vegas 2017-12-25 14:22:15 +01:00
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c tcp: cwnd does not increase in TCP YeAH 2016-09-30 10:18:34 +02:00
tunnel4.c
udp.c ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg 2018-05-26 08:48:46 +02:00
udp_diag.c
udp_impl.h
udp_offload.c net: avoid skb_warn_bad_offload false positives on UFO 2017-08-12 19:29:08 -07:00
udp_tunnel.c
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu 2018-05-30 07:49:04 +02:00
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c