diff options
author | Leigh Brown <leigh@solinno.co.uk> | 2006-12-17 20:12:30 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-18 00:59:25 -0500 |
commit | 8228a18dd30f5c988b722495ea6c25cb1d2be035 (patch) | |
tree | 20469a1ca9989d399d175f138e9b6d1c33c5f1af /net/ipv4/tcp_ipv4.c | |
parent | d8172d822fb02d5c4f7508e41f9267428dd3d891 (diff) |
[TCP]: Fix oops caused by tcp_v4_md5_do_del
md5sig_info.alloced4 must be set to zero when freeing keys4, otherwise
it will not be alloc'd again when another key is added to the same
socket by tcp_v4_md5_do_add.
Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index a1222d6968c4..fa814fc506d5 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -928,6 +928,7 @@ int tcp_v4_md5_do_del(struct sock *sk, __be32 addr) | |||
928 | if (tp->md5sig_info->entries4 == 0) { | 928 | if (tp->md5sig_info->entries4 == 0) { |
929 | kfree(tp->md5sig_info->keys4); | 929 | kfree(tp->md5sig_info->keys4); |
930 | tp->md5sig_info->keys4 = NULL; | 930 | tp->md5sig_info->keys4 = NULL; |
931 | tp->md5sig_info->alloced4 = 0; | ||
931 | } else if (tp->md5sig_info->entries4 != i) { | 932 | } else if (tp->md5sig_info->entries4 != i) { |
932 | /* Need to do some manipulation */ | 933 | /* Need to do some manipulation */ |
933 | memcpy(&tp->md5sig_info->keys4[i], | 934 | memcpy(&tp->md5sig_info->keys4[i], |