From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] conntrack: fix nfct_clone with certain attribute data types
Date: Tue, 27 Nov 2012 15:19:24 +0100 [thread overview]
Message-ID: <20121127141924.GD14156@breakpoint.cc> (raw)
In-Reply-To: <20121127140509.GA8853@1984>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> On Mon, Nov 19, 2012 at 10:39:55PM +0100, Florian Westphal wrote:
> > --- a/src/conntrack/api.c
> > +++ b/src/conntrack/api.c
> > @@ -147,7 +147,7 @@ struct nf_conntrack *nfct_clone(const struct nf_conntrack *ct)
> >
> > if ((clone = nfct_new()) == NULL)
> > return NULL;
> > - memcpy(clone, ct, sizeof(*ct));
> > + nfct_copy(clone, ct, NFCT_CP_ALL);
>
> That seems safe to me.
>
> Still I think NFCT_CP_OVERRIDE is faster. I added that flag way after
> to improve a bit the copying time.
I missed that, thanks.
Suggestion:
I'll re-send with the above changed to
nfct_copy(clone, ct, NFCT_CP_OVERRIDE)
plus adding copy_attr_help_info(ct1, ct2)
to __copy_fast.
prev parent reply other threads:[~2012-11-27 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 21:39 [PATCH] conntrack: fix nfct_clone with certain attribute data types Florian Westphal
2012-11-27 14:05 ` Pablo Neira Ayuso
2012-11-27 14:19 ` Florian Westphal [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=20121127141924.GD14156@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 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).