All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Sunny73Cr <Sunny73Cr@protonmail.com>
To: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: payload expressions, netlink debug output
Date: Fri, 14 Feb 2025 04:17:17 +0000	[thread overview]
Message-ID: <iUf9BfY67Kl_ry63O6gOxJ2YHKmO-OFslzCRzfWVOxIe15iVlUV2G07XiT0qu5bsF9vvyrDRT4TQODjt2ksTfpiv1-nYlhgG5ryzcidhdug=@protonmail.com> (raw)

Hi,

It appears that the incorrect register is accepted when data is modified.

Running Debian 12.9.

/etc/nftables.conf:

#!/usr/sbin/nft -f
flush ruleset
table inet filter {
 chain output {
  type filter hook output priority filter;

  @ih,0,128 set 0 \
  accept;
 }
}

output (viewable with /usr/sbin/nft -d all -f /etc/nftables.conf):

[ immediate reg 1 0x00000000 0x00000000 0x00000000 0x00000000 ]
[ payload write reg 1 => 16b @ inner header + 0 csum_type 0 csum_off 0 csum_flags 0x1 ]
[ immediate reg 0 accept ]

If reg 1 was modified, I believe it should be reg 1 that is accepted.

Please, may somebody with more experience check my assumption?

sunny

             reply	other threads:[~2025-02-14  4:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14  4:17 Sunny73Cr [this message]
2025-02-14  7:20 ` payload expressions, netlink debug output Florian Westphal
2025-02-15  4:04   ` Sunny73Cr

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='iUf9BfY67Kl_ry63O6gOxJ2YHKmO-OFslzCRzfWVOxIe15iVlUV2G07XiT0qu5bsF9vvyrDRT4TQODjt2ksTfpiv1-nYlhgG5ryzcidhdug=@protonmail.com' \
    --to=sunny73cr@protonmail.com \
    --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.