Messages in this thread Patch in this message | | | Date | Wed, 12 Dec 2007 22:52:50 -0800 | From | Greg KH <> | Subject | [patch 36/60] nf_nat: fix memset error |
| |
2.6.23-stable review patch. If anyone has any objections, please let us know.
------------------ From: Li Zefan <lizf@cn.fujitsu.com>
This patch fixes an incorrect memset in the NAT code, causing misbehaviour when unloading and reloading the NAT module. Applies to stable-2.6.22 and stable-2.6.23.
Please apply, thanks. [NETFILTER]: nf_nat: fix memset error
Upstream commit e0bf9cf15fc30d300b7fbd821c6bc975531fab44
The size passing to memset is the size of a pointer. Fixes misbehaviour when unloading and reloading the NAT module.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- net/ipv4/netfilter/nf_nat_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c @@ -681,7 +681,7 @@ static int clean_nat(struct nf_conn *i, if (!nat) return 0; - memset(nat, 0, sizeof(nat)); + memset(nat, 0, sizeof(*nat)); i->status &= ~(IPS_NAT_MASK | IPS_NAT_DONE_MASK | IPS_SEQ_ADJUST); return 0; } --
| |