From: Patrick McHardy <kaber@trash.net>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] fix the number of bytes cleaned by clean_nat() in net/ipv4/netfilter/nf_nat_core.c
Date: Wed, 07 Nov 2007 00:58:35 +0100 [thread overview]
Message-ID: <4730FFAB.4070000@trash.net> (raw)
In-Reply-To: <4730D58E.2080107@tiscali.nl>
Roel Kluin wrote:
> Zero out 'sizeof(*nat)' rather than 'sizeof(nat)' bytes of the struct
> nf_conn_nat pointer 'nat'
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
> ---
> diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
> index 56e93f6..70e7997 100644
> --- 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, void *data)
>
> 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;
> }
I already have the same patch queued from Li Zefan. Good catch anyway :)
prev parent reply other threads:[~2007-11-06 23:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 20:58 [PATCH] fix the number of bytes cleaned by clean_nat() in net/ipv4/netfilter/nf_nat_core.c Roel Kluin
2007-11-06 23:58 ` Patrick McHardy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4730FFAB.4070000@trash.net \
--to=kaber@trash.net \
--cc=12o3l@tiscali.nl \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.