iptables: cleanup FIXME
A message that is not in the archive (sent off-list or not yet received): Zk9yrd8Ji1xAcblw
PATCH 1/1 iptables: cleanup FIXME
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.
PATCH 1/1 iptables: cleanup FIXME
Rework FIXME since struct ebt_entry has no flags var. Use variable bitmask instead.
Update the debug output.
--- iptables/nft-bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
iptables/nft-bridge.c +2 -2
@@ -373,9 +373,9 @@ static bool nft_bridge_is_same(const struct iptables_command_state *cs_a,int i;if (a->ethproto != b->ethproto || -/* FIXME: a->flags != b->flags || */ + a->bitmask != b->bitmask || a->invflags != b->invflags) { -DEBUGP ("different proto/flags/invflags\n" ); +DEBUGP ("different proto/bitmask/invflags\n" );return false; }
--
2.25.1
Phil Sutter
reviewerHi Michael,
Quoted 3 lines · Michael Estner
I checked bitmask in the
ebt_entrystruct iniptables/xshared.hShould be compared here since bitmask needs to be the first field in the structebt_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