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 <[EMAIL PROTECTED]>

diff -uprN a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
--- a/net/ipv4/tcp_ipv4.c       2006-12-17 09:51:21.000000000 +0000
+++ b/net/ipv4/tcp_ipv4.c       2006-12-17 10:05:54.000000000 +0000
@@ -929,6 +929,7 @@ int tcp_v4_md5_do_del(struct sock *sk, _
                        if (tp->md5sig_info->entries4 == 0) {
                                kfree(tp->md5sig_info->keys4);
                                tp->md5sig_info->keys4 = NULL;
+                               tp->md5sig_info->alloced4 = 0;
                        } else if (tp->md5sig_info->entries4 != i) {
                                /* Need to do some manipulation */
                                memcpy(&tp->md5sig_info->keys4[i],

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to