@@ -46,7 +46,7 @@ EXPORT_SYMBOL_GPL(inet6_ehashfn);
4646 *
4747 * The sockhash lock must be held as a reader here.
4848 */
49- struct sock * __inet6_lookup_established (struct net * net ,
49+ struct sock * __inet6_lookup_established (const struct net * net ,
5050 struct inet_hashinfo * hashinfo ,
5151 const struct in6_addr * saddr ,
5252 const __be16 sport ,
@@ -89,7 +89,7 @@ struct sock *__inet6_lookup_established(struct net *net,
8989}
9090EXPORT_SYMBOL (__inet6_lookup_established );
9191
92- static inline int compute_score (struct sock * sk , struct net * net ,
92+ static inline int compute_score (struct sock * sk , const struct net * net ,
9393 const unsigned short hnum ,
9494 const struct in6_addr * daddr ,
9595 const int dif , const int sdif )
@@ -126,7 +126,7 @@ static inline int compute_score(struct sock *sk, struct net *net,
126126 * Return: NULL if sk doesn't have SO_REUSEPORT set, otherwise a pointer to
127127 * the selected sock or an error.
128128 */
129- struct sock * inet6_lookup_reuseport (struct net * net , struct sock * sk ,
129+ struct sock * inet6_lookup_reuseport (const struct net * net , struct sock * sk ,
130130 struct sk_buff * skb , int doff ,
131131 const struct in6_addr * saddr ,
132132 __be16 sport ,
@@ -147,7 +147,7 @@ struct sock *inet6_lookup_reuseport(struct net *net, struct sock *sk,
147147EXPORT_SYMBOL_GPL (inet6_lookup_reuseport );
148148
149149/* called with rcu_read_lock() */
150- static struct sock * inet6_lhash2_lookup (struct net * net ,
150+ static struct sock * inet6_lhash2_lookup (const struct net * net ,
151151 struct inet_listen_hashbucket * ilb2 ,
152152 struct sk_buff * skb , int doff ,
153153 const struct in6_addr * saddr ,
@@ -174,7 +174,7 @@ static struct sock *inet6_lhash2_lookup(struct net *net,
174174 return result ;
175175}
176176
177- struct sock * inet6_lookup_run_sk_lookup (struct net * net ,
177+ struct sock * inet6_lookup_run_sk_lookup (const struct net * net ,
178178 int protocol ,
179179 struct sk_buff * skb , int doff ,
180180 const struct in6_addr * saddr ,
@@ -199,7 +199,7 @@ struct sock *inet6_lookup_run_sk_lookup(struct net *net,
199199}
200200EXPORT_SYMBOL_GPL (inet6_lookup_run_sk_lookup );
201201
202- struct sock * inet6_lookup_listener (struct net * net ,
202+ struct sock * inet6_lookup_listener (const struct net * net ,
203203 struct inet_hashinfo * hashinfo ,
204204 struct sk_buff * skb , int doff ,
205205 const struct in6_addr * saddr ,
@@ -243,7 +243,8 @@ struct sock *inet6_lookup_listener(struct net *net,
243243}
244244EXPORT_SYMBOL_GPL (inet6_lookup_listener );
245245
246- struct sock * inet6_lookup (struct net * net , struct inet_hashinfo * hashinfo ,
246+ struct sock * inet6_lookup (const struct net * net ,
247+ struct inet_hashinfo * hashinfo ,
247248 struct sk_buff * skb , int doff ,
248249 const struct in6_addr * saddr , const __be16 sport ,
249250 const struct in6_addr * daddr , const __be16 dport ,
0 commit comments