All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Florian Westphal <fw@strlen.de>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v3 nf-next 5/7] netfilter: add and use nf_ct_set helper
Date: Mon, 23 Jan 2017 22:22:02 +0100	[thread overview]
Message-ID: <20170123212202.GB13546@breakpoint.cc> (raw)
In-Reply-To: <alpine.DEB.2.10.1701232033320.21987@blackhole.kfki.hu>

Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> wrote:
> > > > --- a/net/netfilter/core.c
> > > > +++ b/net/netfilter/core.c
> > > > @@ -375,7 +375,7 @@ void nf_ct_attach(struct sk_buff *new, const struct sk_buff *skb)
> > > >  {
> > > >  	void (*attach)(struct sk_buff *, const struct sk_buff *);
> > > >  
> > > > -	if (skb_nfct(skb)) {
> > > > +	if (skb->nfct) {
> > > 
> > > I guess this slipped through accidentally. No need to resent, I can
> > > amend it here.
> > 
> > Hmm, let me review this.  I thin the skb_nfct() conversion is erroneous.
> > (Q: If original is UNTRRACKED, should the reply packet that is being
> >  attached be UNTRACKED or INVALID?)
> 
> If the packet is UNTRACKED, then how can there be a reply packet from 
> conntrack point of view? In my opinion it's the user responsibility to 
> handle both directions.

afaics it would happen with this:

-t raw -j UNTRACKED
-t filter -j REJECT

REJECT target ends up calling nf_ct_attach to associate the rst/icmp
packet with original skb->nfct.


  reply	other threads:[~2017-01-23 21:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 12:28 [PATCH nf-next v3 0/7] netfilter: skbuff: merge nfctinfo bits and nfct pointer Florian Westphal
2017-01-23 12:28 ` [PATCH v3 nf-next 1/7] netfilter: conntrack: no need to pass ctinfo to error handler Florian Westphal
2017-01-23 12:28 ` [PATCH v3 nf-next 2/7] netfilter: reset netfilter state when duplicating packet Florian Westphal
2017-01-23 12:28 ` [PATCH v3 nf-next 3/7] netfilter: reduce direct skb->nfct usage Florian Westphal
2017-01-23 12:28 ` [PATCH v3 nf-next 4/7] skbuff: add and use skb_nfct helper Florian Westphal
2017-01-23 12:28 ` [PATCH v3 nf-next 5/7] netfilter: add and use nf_ct_set helper Florian Westphal
2017-01-23 12:54   ` Pablo Neira Ayuso
2017-01-23 16:10     ` Florian Westphal
2017-01-23 19:37       ` Jozsef Kadlecsik
2017-01-23 21:22         ` Florian Westphal [this message]
2017-01-23 22:57           ` Jozsef Kadlecsik
2017-01-23 12:28 ` [PATCH v3 nf-next 6/7] netfilter: guarantee 8 byte minalign for template addresses Florian Westphal
2017-01-23 12:28 ` [PATCH v3 nf-next 7/7] netfilter: merge ctinfo into nfct pointer storage area Florian Westphal

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=20170123212202.GB13546@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=kadlec@blackhole.kfki.hu \
    --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 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.