Alexander Lobakin 55e729889b net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO
udp{4,6}_lib_lookup_skb() use ip{,v6}_hdr() to get IP header of the
packet. While it's probably OK for non-frag0 paths, this helpers
will also point to junk on Fast/frag0 GRO when all headers are
located in frags. As a result, sk/skb lookup may fail or give wrong
results. To support both GRO modes, skb_gro_network_header() might
be used. To not modify original functions, add private versions of
udp{4,6}_lib_lookup_skb() only to perform correct sk lookups on GRO.

Present since the introduction of "application-level" UDP GRO
in 4.7-rc1.

Misc: replace totally unneeded ternaries with plain ifs.

Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
Suggested-by: Willem de Bruijn <willemb@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-12 09:55:51 -08:00
..
2020-03-12 15:55:00 -07:00
2020-03-12 15:55:00 -07:00
2020-10-16 16:47:09 -07:00
2020-03-30 13:45:04 -07:00
2020-10-06 06:23:21 -07:00
2020-08-31 12:33:34 -07:00
2020-03-16 18:26:54 -07:00
2020-09-25 17:17:14 -07:00
2020-09-30 14:21:30 -07:00
2020-03-16 18:26:55 -07:00
2020-08-24 17:31:20 -07:00