All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] src: allow update of net base w. meta l4proto icmpv6
Date: Wed, 22 Mar 2017 14:09:02 +0100	[thread overview]
Message-ID: <20170322130902.GA21742@salvia> (raw)
In-Reply-To: <20170321185437.22959-1-fw@strlen.de>

On Tue, Mar 21, 2017 at 07:54:37PM +0100, Florian Westphal wrote:
> nft add rule ip6 f i meta l4proto ipv6-icmp icmpv6 type nd-router-advert
> <cmdline>:1:50-60: Error: conflicting protocols specified: unknown vs. icmpv6
> 
> add icmpv6 to nexthdr list so base gets updated correctly.
> 
> Reported-by: Thomas Woerner <twoerner@redhat.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  NB: This is STILL not correct.
>  nft add rule ip6 f i meta l4proto ipv6-icmp icmpv6 type nd-router-advert
>  gets listed as
>   icmpv6 type nd-router-advert
> 
> because post processing removes the l3 dependency.
> 
> However, "icmpv6 type nd-router-advert" uses dependency
> ip6 nexthdr icmpv6
> which isn't the same as meta l4proto icmpv6.
> 
> I suspect nft should always generate implicit l4 dependencies
> via meta in the ipv6 case, what do others think
> (and not autoremove 'nexthdr' check)?

I think we should use meta l4proto, ip6 nexthdr may point to some of
the extension headers in the packet actually.

> diff --git a/src/proto.c b/src/proto.c
> index 79e9dbf2b33e..fcdfbe73c735 100644
> --- a/src/proto.c
> +++ b/src/proto.c
> @@ -779,6 +779,7 @@ const struct proto_desc proto_inet_service = {
>  		PROTO_LINK(IPPROTO_TCP,		&proto_tcp),
>  		PROTO_LINK(IPPROTO_DCCP,	&proto_dccp),
>  		PROTO_LINK(IPPROTO_SCTP,	&proto_sctp),
> +		PROTO_LINK(IPPROTO_ICMPV6,	&proto_icmp6),

This also allows icmp6 from IPv4, right? I remember I mentioned this
in a patch that I attached to bugzilla at some point so I didn't apply
this.

  reply	other threads:[~2017-03-22 13:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 18:54 [PATCH nft] src: allow update of net base w. meta l4proto icmpv6 Florian Westphal
2017-03-22 13:09 ` Pablo Neira Ayuso [this message]
2017-03-22 13:44   ` Florian Westphal
2017-03-22 15:29     ` Pablo Neira Ayuso
2017-03-22 15:32       ` Pablo Neira Ayuso
2017-03-22 15:44         ` Florian Westphal
2017-03-22 16:07           ` Pablo Neira Ayuso
2017-03-22 19:22             ` Florian Westphal
2017-03-24 11:50               ` Pablo Neira Ayuso
2017-03-24 12:21                 ` Florian Westphal
2017-03-29 10:13                   ` Pablo Neira Ayuso

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=20170322130902.GA21742@salvia \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --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.