Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipv6: avoid indirect calls for SOL_IP socket options

ipv6_setsockopt() can directly call ip_setsockopt()
instead of going through udp_prot.setsockopt()

ipv6_getsockopt() can directly call ip_getsockopt()
instead of going through udp_prot.getsockopt()

These indirections predate git history, not sure why they
were there.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20240823140019.3727643-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
89683b45 9ceebd7a

+2 -2
+2 -2
net/ipv6/ipv6_sockglue.c
··· 985 985 int err; 986 986 987 987 if (level == SOL_IP && sk->sk_type != SOCK_RAW) 988 - return udp_prot.setsockopt(sk, level, optname, optval, optlen); 988 + return ip_setsockopt(sk, level, optname, optval, optlen); 989 989 990 990 if (level != SOL_IPV6) 991 991 return -ENOPROTOOPT; ··· 1475 1475 int err; 1476 1476 1477 1477 if (level == SOL_IP && sk->sk_type != SOCK_RAW) 1478 - return udp_prot.getsockopt(sk, level, optname, optval, optlen); 1478 + return ip_getsockopt(sk, level, optname, optval, optlen); 1479 1479 1480 1480 if (level != SOL_IPV6) 1481 1481 return -ENOPROTOOPT;