Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d78a84913abc1b2ef1ec0c14a78ec99517cc122
Commit:     5d78a84913abc1b2ef1ec0c14a78ec99517cc122
Parent:     df293bbb6ff80f40a2308140ba4cbc2d3c1b18da
Author:     Yasuyuki Kozakai <[EMAIL PROTECTED]>
AuthorDate: Thu May 10 14:16:24 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu May 10 23:47:48 2007 -0700

    [NETFILTER]: nf_nat: Clears helper private area when NATing
    
    Some helpers (eg. ftp) assume that private area in conntrack is
    filled with zero. It should be cleared when helper is changed.
    
    Signed-off-by: Yasuyuki Kozakai <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/nf_conntrack_core.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c 
b/net/netfilter/nf_conntrack_core.c
index 94000a4..e8b5c2d 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -888,8 +888,13 @@ void nf_conntrack_alter_reply(struct nf_conn *ct,
        NF_CT_DUMP_TUPLE(newreply);
 
        ct->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply;
-       if (!ct->master && help && help->expecting == 0)
-               help->helper = __nf_ct_helper_find(newreply);
+       if (!ct->master && help && help->expecting == 0) {
+               struct nf_conntrack_helper *helper;
+               helper = __nf_ct_helper_find(newreply);
+               if (helper)
+                       memset(&help->help, 0, sizeof(help->help));
+               help->helper = helper;
+       }
        write_unlock_bh(&nf_conntrack_lock);
 }
 EXPORT_SYMBOL_GPL(nf_conntrack_alter_reply);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to