OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
780e982
)
l2tp: remove redundant addr_len check in l2tp_ip_bind()
author
Guillaume Nault
<g.nault@alphalink.fr>
Fri, 6 Jan 2017 19:03:54 +0000
(20:03 +0100)
committer
David S. Miller
<davem@davemloft.net>
Sat, 7 Jan 2017 03:18:56 +0000
(22:18 -0500)
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>
net/l2tp/l2tp_ip.c
patch
|
blob
|
history
diff --git
a/net/l2tp/l2tp_ip.c
b/net/l2tp/l2tp_ip.c
index
3d73278
..
992761e
100644
(file)
--- 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);