aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp/l2tp_ip6.c
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2017-01-06 20:03:55 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-06 22:18:56 -0500
commitbb39b0bdc8c62e97ceedb9a5dadea0f098431d8b (patch)
tree4d07c8a52eae4b33e2aaeae603509f740fa6f89e /net/l2tp/l2tp_ip6.c
parentl2tp: remove redundant addr_len check in l2tp_ip_bind() (diff)
downloadlinux-dev-bb39b0bdc8c62e97ceedb9a5dadea0f098431d8b.tar.xz
linux-dev-bb39b0bdc8c62e97ceedb9a5dadea0f098431d8b.zip
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: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_ip6.c')
-rw-r--r--net/l2tp/l2tp_ip6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 331ccf5a7bad..2f6be6ddc8cb 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -57,8 +57,8 @@ static inline struct l2tp_ip6_sock *l2tp_ip6_sk(const struct sock *sk)
return (struct l2tp_ip6_sock *)sk;
}
-static struct sock *__l2tp_ip6_bind_lookup(struct net *net,
- struct in6_addr *laddr,
+static struct sock *__l2tp_ip6_bind_lookup(const struct net *net,
+ const struct in6_addr *laddr,
const struct in6_addr *raddr,
int dif, u32 tunnel_id)
{
@@ -67,7 +67,7 @@ static struct sock *__l2tp_ip6_bind_lookup(struct net *net,
sk_for_each_bound(sk, &l2tp_ip6_bind_table) {
const struct in6_addr *sk_laddr = inet6_rcv_saddr(sk);
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)
continue;