diff options
author | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2007-05-10 17:16:24 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-11 02:47:48 -0400 |
commit | 5d78a84913abc1b2ef1ec0c14a78ec99517cc122 (patch) | |
tree | 9b82e98f371ea2d9db40028ed473fc39ddbfbdee /net | |
parent | df293bbb6ff80f40a2308140ba4cbc2d3c1b18da (diff) |
[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 <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | 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 94000a4c7dcf..e8b5c2d7db62 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, | |||
888 | NF_CT_DUMP_TUPLE(newreply); | 888 | NF_CT_DUMP_TUPLE(newreply); |
889 | 889 | ||
890 | ct->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply; | 890 | ct->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply; |
891 | if (!ct->master && help && help->expecting == 0) | 891 | if (!ct->master && help && help->expecting == 0) { |
892 | help->helper = __nf_ct_helper_find(newreply); | 892 | struct nf_conntrack_helper *helper; |
893 | helper = __nf_ct_helper_find(newreply); | ||
894 | if (helper) | ||
895 | memset(&help->help, 0, sizeof(help->help)); | ||
896 | help->helper = helper; | ||
897 | } | ||
893 | write_unlock_bh(&nf_conntrack_lock); | 898 | write_unlock_bh(&nf_conntrack_lock); |
894 | } | 899 | } |
895 | EXPORT_SYMBOL_GPL(nf_conntrack_alter_reply); | 900 | EXPORT_SYMBOL_GPL(nf_conntrack_alter_reply); |