From: Arnaldo Carvalho de Melo Date: Tue, 28 Nov 2006 21:42:03 +0000 (-0200) Subject: [DCCP]: Make {set,get}sockopt(DCCP_SOCKOPT_PACKET_SIZE) return 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=841bac1d607d8bf2e068e4b24393fb77372814e3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [DCCP]: Make {set,get}sockopt(DCCP_SOCKOPT_PACKET_SIZE) return 0 To reflect the fact that this now is of no effect, not making apps stop working, just be warned in the system log. Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 2604e34d8f38..5ec47d9ee447 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -471,7 +471,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname, switch (optname) { case DCCP_SOCKOPT_PACKET_SIZE: DCCP_WARN("sockopt(PACKET_SIZE) is deprecated: fix your app\n"); - err = -EINVAL; + err = 0; break; case DCCP_SOCKOPT_CHANGE_L: if (optlen != sizeof(struct dccp_so_feat)) @@ -583,7 +583,7 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname, switch (optname) { case DCCP_SOCKOPT_PACKET_SIZE: DCCP_WARN("sockopt(PACKET_SIZE) is deprecated: fix your app\n"); - return -EINVAL; + return 0; case DCCP_SOCKOPT_SERVICE: return dccp_getsockopt_service(sk, len, (__be32 __user *)optval, optlen);