netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "William N." <netfilter@riseup.net>
To: netfilter@vger.kernel.org
Subject: nftables: How to match ICMPv6 subtype in a rule?
Date: Sat, 30 Mar 2024 19:41:39 -0000	[thread overview]
Message-ID: <20240330194139.561b5a24@localhost> (raw)

Hello,

I have been reading RFC 4890 and 4443, as well as nftables wiki and man
page.

It is obvious how to match ICMPv6 types using 'icmpv6 type'. However,
as RFC 4890 recommends, there are situations where only a specific
SUBtype must be accepted, e.g. section 4.3.1:

   o  Time Exceeded (Type 3) - Code 0 only
   o  Parameter Problem (Type 4) - Codes 1 and 2 only

I have been searching for days and I can't find any info about matching
ICMPv6 subtypes. ip6tables can do that (as shown in the example in the
RFC) but no info about nftables. ip6tables-translate cannot translate
subtype rules (it converts them to a comment).

So, what is the nftables syntax to accept only a specific subtype of an
ICMPv6 type?



FWIW, I am on Debian 12:

# nft -V
nftables v1.0.6 (Lester Gooch #5)
  cli:          editline
  json:         yes
  minigmp:      no
  libxtables:   yes

             reply	other threads:[~2024-03-30 19:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-30 19:41 William N. [this message]
2024-03-31  6:33 ` nftables: How to match ICMPv6 subtype in a rule? Kerin Millar
2024-03-31 17:02   ` William N.
2024-03-31 18:34     ` Kerin Millar
2024-04-01 17:19       ` William N.
2024-04-01 22:59       ` Pablo Neira Ayuso
2024-04-02  7:29         ` William N.
2024-04-02 10:06           ` Pablo Neira Ayuso
2024-04-02 13:24             ` William N.

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=20240330194139.561b5a24@localhost \
    --to=netfilter@riseup.net \
    --cc=netfilter@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 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 read-only IMAP folder(s) and NNTP newsgroup(s).