Commit bb39b0bd authored by Guillaume Nault's avatar Guillaume Nault Committed by David S. Miller

l2tp: make __l2tp_ip*_bind_lookup() parameters 'const'

Add const qualifier wherever possible for __l2tp_ip_bind_lookup() and
__l2tp_ip6_bind_lookup().
Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8cf2f704
...@@ -53,8 +53,8 @@ static struct sock *__l2tp_ip_bind_lookup(const struct net *net, __be32 laddr, ...@@ -53,8 +53,8 @@ static struct sock *__l2tp_ip_bind_lookup(const struct net *net, __be32 laddr,
struct sock *sk; struct sock *sk;
sk_for_each_bound(sk, &l2tp_ip_bind_table) { sk_for_each_bound(sk, &l2tp_ip_bind_table) {
struct inet_sock *inet = inet_sk(sk); const struct l2tp_ip_sock *l2tp = l2tp_ip_sk(sk);
struct l2tp_ip_sock *l2tp = l2tp_ip_sk(sk); const struct inet_sock *inet = inet_sk(sk);
if (l2tp == NULL) if (l2tp == NULL)
continue; continue;
......
...@@ -57,8 +57,8 @@ static inline struct l2tp_ip6_sock *l2tp_ip6_sk(const struct sock *sk) ...@@ -57,8 +57,8 @@ static inline struct l2tp_ip6_sock *l2tp_ip6_sk(const struct sock *sk)
return (struct l2tp_ip6_sock *)sk; return (struct l2tp_ip6_sock *)sk;
} }
static struct sock *__l2tp_ip6_bind_lookup(struct net *net, static struct sock *__l2tp_ip6_bind_lookup(const struct net *net,
struct in6_addr *laddr, const struct in6_addr *laddr,
const struct in6_addr *raddr, const struct in6_addr *raddr,
int dif, u32 tunnel_id) int dif, u32 tunnel_id)
{ {
...@@ -67,7 +67,7 @@ static struct sock *__l2tp_ip6_bind_lookup(struct net *net, ...@@ -67,7 +67,7 @@ static struct sock *__l2tp_ip6_bind_lookup(struct net *net,
sk_for_each_bound(sk, &l2tp_ip6_bind_table) { sk_for_each_bound(sk, &l2tp_ip6_bind_table) {
const struct in6_addr *sk_laddr = inet6_rcv_saddr(sk); const struct in6_addr *sk_laddr = inet6_rcv_saddr(sk);
const struct in6_addr *sk_raddr = &sk->sk_v6_daddr; const struct in6_addr *sk_raddr = &sk->sk_v6_daddr;
struct l2tp_ip6_sock *l2tp = l2tp_ip6_sk(sk); const struct l2tp_ip6_sock *l2tp = l2tp_ip6_sk(sk);
if (l2tp == NULL) if (l2tp == NULL)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment