* [patch 07/36] nf_nat: fix memset error
[not found] ` <20071213063308.GA25301@kroah.com>
@ 2007-12-13 6:34 ` Greg KH
0 siblings, 0 replies; only message in thread
From: Greg KH @ 2007-12-13 6:34 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
Netfilter Development Mailinglist, David S. Miller, Li Zefan,
Patrick McHardy
[-- Attachment #1: nf_nat-fix-memset-error.patch --]
[-- Type: text/plain, Size: 1155 bytes --]
2.6.22-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
@@ -633,7 +633,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;
}
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-13 6:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20071213062511.265908583@mini.kroah.org>
[not found] ` <20071213063308.GA25301@kroah.com>
2007-12-13 6:34 ` [patch 07/36] nf_nat: fix memset error Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).