summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-08-02 13:40:29 +0000
committerJakub Kicinski <kuba@kernel.org>2024-08-05 16:27:26 -0700
commit87d973e8ddeeddf1777e6689df86d5d369cbcbb3 (patch)
treeaaa11622470725107c1e09d313d177bcce1a1ab2 /include
parent10b2a44ccb0cdf85480b6f73a23530aa3ac722de (diff)
downloadlwn-87d973e8ddeeddf1777e6689df86d5d369cbcbb3.tar.gz
lwn-87d973e8ddeeddf1777e6689df86d5d369cbcbb3.zip
ipv6: udp: constify 'struct net' parameter of socket lookups
Following helpers do not touch their 'struct net' argument. - udp6_lib_lookup() - __udp6_lib_lookup() Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240802134029.3748005-6-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/ipv6_stubs.h2
-rw-r--r--include/net/udp.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/net/ipv6_stubs.h b/include/net/ipv6_stubs.h
index 11cefd50704d..8a3465c8c2c5 100644
--- a/include/net/ipv6_stubs.h
+++ b/include/net/ipv6_stubs.h
@@ -82,7 +82,7 @@ extern const struct ipv6_stub *ipv6_stub __read_mostly;
struct ipv6_bpf_stub {
int (*inet6_bind)(struct sock *sk, struct sockaddr *uaddr, int addr_len,
u32 flags);
- struct sock *(*udp6_lib_lookup)(struct net *net,
+ struct sock *(*udp6_lib_lookup)(const struct net *net,
const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport,
int dif, int sdif, struct udp_table *tbl,
diff --git a/include/net/udp.h b/include/net/udp.h
index a0217e3cfe4f..5ca53b1cec67 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -305,11 +305,11 @@ struct sock *__udp4_lib_lookup(const struct net *net, __be32 saddr,
struct udp_table *tbl, struct sk_buff *skb);
struct sock *udp4_lib_lookup_skb(const struct sk_buff *skb,
__be16 sport, __be16 dport);
-struct sock *udp6_lib_lookup(struct net *net,
+struct sock *udp6_lib_lookup(const struct net *net,
const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport,
int dif);
-struct sock *__udp6_lib_lookup(struct net *net,
+struct sock *__udp6_lib_lookup(const struct net *net,
const struct in6_addr *saddr, __be16 sport,
const struct in6_addr *daddr, __be16 dport,
int dif, int sdif, struct udp_table *tbl,