From: Guillaume Nault Date: Fri, 6 Jan 2017 19:03:54 +0000 (+0100) Subject: l2tp: remove redundant addr_len check in l2tp_ip_bind() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8cf2f704534147ce84c4df951887c1d49fe9350c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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);