summaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2017-01-06 20:03:54 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-07 04:18:56 +0100
commit8cf2f704534147ce84c4df951887c1d49fe9350c (patch)
treecad0ec22439eca9d10b6936d4412d740c9c23006 /net/l2tp
parentRDS: validate the requested traces user input against max supported (diff)
downloadlinux-8cf2f704534147ce84c4df951887c1d49fe9350c.tar.xz
linux-8cf2f704534147ce84c4df951887c1d49fe9350c.zip
l2tp: remove redundant addr_len check in l2tp_ip_bind()
addr_len's value has already been verified at this point. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 3d73278b86ca..992761e721af 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -258,7 +258,7 @@ static int l2tp_ip_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
if (!sock_flag(sk, SOCK_ZAPPED))
goto out;
- if (sk->sk_state != TCP_CLOSE || addr_len < sizeof(struct sockaddr_l2tpip))
+ if (sk->sk_state != TCP_CLOSE)
goto out;
chk_addr_ret = inet_addr_type(net, addr->l2tp_addr.s_addr);