inet_diag: constify raw_lookup() socket argument
authorEric Dumazet <edumazet@google.com>
Thu, 16 Mar 2023 15:32:02 +0000 (15:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Mar 2023 08:56:37 +0000 (08:56 +0000)
Now both raw_v4_match() and raw_v6_match() accept a const socket,
raw_lookup() can do the same to clarify its role.

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>
net/ipv4/raw_diag.c

index 999321834b94a8f7f2a4996575b7cfaafb6fa2b7..bca49a844f01083cdfdade6f52852d48ddb36d70 100644 (file)
@@ -34,7 +34,7 @@ raw_get_hashinfo(const struct inet_diag_req_v2 *r)
  * use helper to figure it out.
  */
 
-static bool raw_lookup(struct net *net, struct sock *sk,
+static bool raw_lookup(struct net *net, const struct sock *sk,
                       const struct inet_diag_req_v2 *req)
 {
        struct inet_diag_req_raw *r = (void *)req;