@@ -365,7 +365,7 @@ int udp_v4_get_port(struct sock *sk, unsigned short snum)
365365 return udp_lib_get_port (sk , snum , hash2_nulladdr );
366366}
367367
368- static int compute_score (struct sock * sk , struct net * net ,
368+ static int compute_score (struct sock * sk , const struct net * net ,
369369 __be32 saddr , __be16 sport ,
370370 __be32 daddr , unsigned short hnum ,
371371 int dif , int sdif )
@@ -420,7 +420,7 @@ u32 udp_ehashfn(const struct net *net, const __be32 laddr, const __u16 lport,
420420}
421421
422422/* called with rcu_read_lock() */
423- static struct sock * udp4_lib_lookup2 (struct net * net ,
423+ static struct sock * udp4_lib_lookup2 (const struct net * net ,
424424 __be32 saddr , __be16 sport ,
425425 __be32 daddr , unsigned int hnum ,
426426 int dif , int sdif ,
@@ -480,7 +480,7 @@ static struct sock *udp4_lib_lookup2(struct net *net,
480480/* UDP is nearly always wildcards out the wazoo, it makes no sense to try
481481 * harder than this. -DaveM
482482 */
483- struct sock * __udp4_lib_lookup (struct net * net , __be32 saddr ,
483+ struct sock * __udp4_lib_lookup (const struct net * net , __be32 saddr ,
484484 __be16 sport , __be32 daddr , __be16 dport , int dif ,
485485 int sdif , struct udp_table * udptable , struct sk_buff * skb )
486486{
@@ -561,7 +561,7 @@ struct sock *udp4_lib_lookup_skb(const struct sk_buff *skb,
561561 * Does increment socket refcount.
562562 */
563563#if IS_ENABLED (CONFIG_NF_TPROXY_IPV4 ) || IS_ENABLED (CONFIG_NF_SOCKET_IPV4 )
564- struct sock * udp4_lib_lookup (struct net * net , __be32 saddr , __be16 sport ,
564+ struct sock * udp4_lib_lookup (const struct net * net , __be32 saddr , __be16 sport ,
565565 __be32 daddr , __be16 dport , int dif )
566566{
567567 struct sock * sk ;
0 commit comments