net: gro: add flush check in udp_gro_receive_segment
authorRichard Gobert <richardbgobert@gmail.com>
Tue, 30 Apr 2024 14:35:55 +0000 (16:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 09:50:51 +0000 (11:50 +0200)
commit83ac89e3797dfb0e43553847c55329a526a4bc7c
tree30cf320bee8930e30132859a5ac6e3a8998f686b
parent1b127feac2470f404168e61913ee0e1cdeca5746
net: gro: add flush check in udp_gro_receive_segment

[ Upstream commit 5babae777c61aa8a8679d59d3cdc54165ad96d42 ]

GRO-GSO path is supposed to be transparent and as such L3 flush checks are
relevant to all UDP flows merging in GRO. This patch uses the same logic
and code from tcp_gro_receive, terminating merge if flush is non zero.

Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.")
Signed-off-by: Richard Gobert <richardbgobert@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/udp_offload.c