ipv6: avoid indirect calls for SOL_IP socket options
Subsystems (3)
PATCH 1/1 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.
--- net/ipv6/ipv6_sockglue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv6/ipv6_sockglue.c +2 -2
@@ -985,7 +985,7 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,int err;if (level ==SOL_IP && sk->sk_type !=SOCK_RAW ) -return udp_prot.setsockopt (sk, level, optname, optval, optlen); +return ip_setsockopt (sk, level, optname, optval, optlen);if (level !=SOL_IPV6 )return -ENOPROTOOPT ;
@@ -1475,7 +1475,7 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,int err;if (level ==SOL_IP && sk->sk_type !=SOCK_RAW ) -return udp_prot.getsockopt (sk, level, optname, optval, optlen); +return ip_getsockopt (sk, level, optname, optval, optlen);if (level !=SOL_IPV6 )return -ENOPROTOOPT ;
Signature · 1 line
2.46.0.295.g3b9ea8a38a-goog
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Fri, 23 Aug 2024 14:00:19 +0000 you wrote:
ipv6_setsockopt()can directly callip_setsockopt()instead of going throughudp_prot.setsockopt()
ipv6_getsockopt()can directly callip_getsockopt()instead of going throughudp_prot.getsockopt()These indirections predate git history, not sure why they were there.
[...]
Here is the summary with links:
- [net] ipv6: avoid indirect calls for SOL_IP socket options
https://git.kernel.org/netdev/net-next/c/89683b45f15c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html