ipv6: raw: constify raw_v6_match() socket argument
authorEric Dumazet <edumazet@google.com>
Thu, 16 Mar 2023 15:32:00 +0000 (15:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 08:56:37 +0000 (08:56 +0000)
This clarifies raw_v6_match() intent.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/rawv6.h
net/ipv6/raw.c

index bc70909625f60dcd819f50a258841d20e5ba0c68..82810cbe37984437569186783f39f166e89cb9b8 100644 (file)
@@ -6,7 +6,7 @@
 #include <net/raw.h>
 
 extern struct raw_hashinfo raw_v6_hashinfo;
-bool raw_v6_match(struct net *net, struct sock *sk, unsigned short num,
+bool raw_v6_match(struct net *net, const struct sock *sk, unsigned short num,
                  const struct in6_addr *loc_addr,
                  const struct in6_addr *rmt_addr, int dif, int sdif);
 
index bac9ba747bdecf8df24acb6c980a822d8f237403..6ac2f2690c44c96e9ac4cb7368ee7abdbeaf4334 100644 (file)
@@ -64,7 +64,7 @@
 struct raw_hashinfo raw_v6_hashinfo;
 EXPORT_SYMBOL_GPL(raw_v6_hashinfo);
 
-bool raw_v6_match(struct net *net, struct sock *sk, unsigned short num,
+bool raw_v6_match(struct net *net, const struct sock *sk, unsigned short num,
                  const struct in6_addr *loc_addr,
                  const struct in6_addr *rmt_addr, int dif, int sdif)
 {