From: Norman Maurer Date: Thu, 1 Apr 2021 06:59:17 +0000 (+0200) Subject: net: udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...); X-Git-Tag: v5.4.112~37 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=537a2449cc6f71c7e0eb17a36203fca3c115660b;p=wrapfs-4.14.y.git net: udp: Add support for getsockopt(..., ..., UDP_GRO, ..., ...); [ Upstream commit 98184612aca0a9ee42b8eb0262a49900ee9eef0d ] Support for UDP_GRO was added in the past but the implementation for getsockopt was missed which did lead to an error when we tried to retrieve the setting for UDP_GRO. This patch adds the missing switch case for UDP_GRO Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.") Signed-off-by: Norman Maurer Reviewed-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 994a150ae3e9..24841a9e9966 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -2692,6 +2692,10 @@ int udp_lib_getsockopt(struct sock *sk, int level, int optname, val = up->gso_size; break; + case UDP_GRO: + val = up->gro_enabled; + break; + /* The following two cannot be changed on UDP sockets, the return is * always 0 (which corresponds to the full checksum coverage of UDP). */ case UDPLITE_SEND_CSCOV: