summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2026-01-20 12:53:53 +0000
committerJakub Kicinski <kuba@kernel.org>2026-01-21 19:20:04 -0800
commita4674aa58be53921f2aba62e143cc338d6ab142c (patch)
tree3d9f532370c447ac8d36768f866bdfb362ab8341 /net
parent1b58c94e9cf928970d5287550d3005389b198ff9 (diff)
downloadlinux-next-a4674aa58be53921f2aba62e143cc338d6ab142c.tar.gz
linux-next-a4674aa58be53921f2aba62e143cc338d6ab142c.zip
tcp: preserve const qualifier in tcp_rsk() and inet_rsk()
We can change tcp_rsk() and inet_rsk() to propagate their argument const qualifier thanks to container_of_const(). Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260120125353.1470456-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/inet_connection_sock.c2
-rw-r--r--net/ipv6/inet6_connection_sock.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 97d57c52b9ad..13372d2cbed5 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -1196,7 +1196,7 @@ struct sock *inet_csk_clone_lock(const struct sock *sk,
{
struct sock *newsk = sk_clone_lock(sk, priority);
struct inet_connection_sock *newicsk;
- struct inet_request_sock *ireq;
+ const struct inet_request_sock *ireq;
struct inet_sock *newinet;
if (!newsk)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index ea5cf3fdfdd6..3aedd51c9bdb 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -29,7 +29,7 @@ struct dst_entry *inet6_csk_route_req(const struct sock *sk,
const struct request_sock *req,
u8 proto)
{
- struct inet_request_sock *ireq = inet_rsk(req);
+ const struct inet_request_sock *ireq = inet_rsk(req);
const struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;