projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ceebd7
)
ipv6: avoid indirect calls for SOL_IP socket options
author
Eric Dumazet
<edumazet@google.com>
Fri, 23 Aug 2024 14:00:19 +0000
(14:00 +0000)
committer
Jakub Kicinski
<kuba@kernel.org>
Mon, 26 Aug 2024 21:53:50 +0000
(14:53 -0700)
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>
net/ipv6/ipv6_sockglue.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv6/ipv6_sockglue.c
b/net/ipv6/ipv6_sockglue.c
index cd342d5015c6fb36bd03d4f3fcae4a3995ff6097..1e225e6489ea150c641ed0757083591def08dfc1 100644
(file)
--- a/
net/ipv6/ipv6_sockglue.c
+++ b/
net/ipv6/ipv6_sockglue.c
@@
-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;