All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo@debian.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nft PATCH v2] payload: explicit network ctx assignation for icmp/icmp6 in special families
Date: Fri, 27 Jan 2017 13:37:13 +0100	[thread overview]
Message-ID: <20170127123713.GA10831@salvia> (raw)
In-Reply-To: <148534500812.3696.9146810123952951607.stgit@nfdev2.cica.es>

On Wed, Jan 25, 2017 at 12:51:08PM +0100, Arturo Borrero Gonzalez wrote:
> In the inet, bridge and netdev families, we can add rules like these:
> 
> % nft add rule inet t c ip protocol icmp icmp type echo-request
> % nft add rule inet t c ip6 nexthdr icmpv6 icmpv6 type echo-request
> 
> However, when we print the ruleset:
> 
> % nft list ruleset
> table inet t {
> 	chain c {
> 		icmpv6 type echo-request
> 		icmp type echo-request
> 	}
> }
> 
> These rules we obtain can't be added again:
> 
> % nft add rule inet t c icmp type echo-request
> <cmdline>:1:19-27: Error: conflicting protocols specified: inet-service vs. icmp
> add rule inet t c icmp type echo-request
>                   ^^^^^^^^^
> 
> % nft add rule inet t c icmpv6 type echo-request
> <cmdline>:1:19-29: Error: conflicting protocols specified: inet-service vs. icmpv6
> add rule inet t c icmpv6 type echo-request
>                   ^^^^^^^^^^^
> 
> Since I wouldn't expect an IP packet carrying ICMPv6, or IPv6 packet
> carrying ICMP, if the link layer is inet, the network layer protocol context
> can be safely update to 'ip' or 'ip6'.
> 
> Moreover, nft currently generates a 'meta nfproto ipvX' depedency when
> using icmp or icmp6 in the inet family, and similar in netdev and bridge
> families.
> 
> While at it, a bit of code factorization is introduced.

Applied, thanks Arturo!

      reply	other threads:[~2017-01-27 12:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 11:51 [nft PATCH v2] payload: explicit network ctx assignation for icmp/icmp6 in special families Arturo Borrero Gonzalez
2017-01-27 12:37 ` Pablo Neira Ayuso [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=20170127123713.GA10831@salvia \
    --to=pablo@netfilter.org \
    --cc=arturo@debian.org \
    --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.