projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06b47aa
)
tcp: md5: remove unneeded check in tcp_v4_parse_md5_keys
author
Dmitry Popov
<ixaphire@qrator.net>
Sun, 3 Aug 2014 18:45:19 +0000
(22:45 +0400)
committer
David S. Miller
<davem@davemloft.net>
Mon, 4 Aug 2014 22:09:45 +0000
(15:09 -0700)
tcpm_key is an array inside struct tcp_md5sig, there is no need to check it
against NULL.
Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/tcp_ipv4.c
b/net/ipv4/tcp_ipv4.c
index d0ba39537d5cd9c5987046c6ff847b83145413a5..992a1f9260095026515802c9360ce44617d4f591 100644
(file)
--- a/
net/ipv4/tcp_ipv4.c
+++ b/
net/ipv4/tcp_ipv4.c
@@
-1049,7
+1049,7
@@
static int tcp_v4_parse_md5_keys(struct sock *sk, char __user *optval,
if (sin->sin_family != AF_INET)
return -EINVAL;
- if (!cmd.tcpm_key
|| !cmd.tcpm_key
len)
+ if (!cmd.tcpm_keylen)
return tcp_md5_do_del(sk, (union tcp_md5_addr *)&sin->sin_addr.s_addr,
AF_INET);