From: Phil Sutter <phil@nwl.cc>
To: Michael Estner <michaelestner@web.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] iptables: cleanup FIXME
Date: Sun, 26 May 2024 11:50:27 +0200 [thread overview]
Message-ID: <ZlMF49DdO0aoiJkL@orbyte.nwl.cc> (raw)
In-Reply-To: <20240524132452.84195-1-michaelestner@web.de>
Hi Michael,
On Fri, May 24, 2024 at 03:24:51PM +0200, Michael Estner wrote:
> I checked bitmask in the ebt_entry struct in iptables/xshared.h
> Should be compared here since bitmask needs to be the first
> field in the struct ebt_entry.
The reason why 'bitmask' has to be the first field is that in kernel
space, the first bit in it is used to distinguish list element types
between 'struct ebt_entries' and 'struct ebt_entry'. See
EBT_ENTRY_OR_ENTRIES define and the related comment in
include/uapi/linux/netfilter_bridge/ebtables.h for reference.
While it seems sensible to do, I wonder why things seem to work fine
even without it. Do we find a corner-case which makes it necessary to
compare 'bitmask'? Or the other way round, is there a case which breaks
if we do?
Cheers, Phil
next prev parent reply other threads:[~2024-05-26 9:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Zk9yrd8Ji1xAcblw>
2024-05-24 13:24 ` [PATCH] iptables: cleanup FIXME Michael Estner
2024-05-24 13:24 ` Michael Estner
2024-05-26 9:50 ` Phil Sutter [this message]
2024-05-23 14:50 Michael Estner
2024-05-23 16:45 ` Phil Sutter
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=ZlMF49DdO0aoiJkL@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=michaelestner@web.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 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 NNTP newsgroup(s).