netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iptables PATCH 0/5] Fixes around ebtables' --proto match
@ 2022-09-27 22:15 Phil Sutter
  2022-09-27 22:15 ` [iptables PATCH 1/5] ebtables: Drop unused OPT_* defines Phil Sutter
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Phil Sutter @ 2022-09-27 22:15 UTC (permalink / raw)
  To: netfilter-devel

During some code merge, I created an ugly situation where local OPT_*
defines in xtables-eb.c override OPT_* enum values from xshared.h with
same name but different value.

The above became problematic when I curtly added --verbose support to
ebtables-nft in order to support -vv debug output. The used OPT_VERBOSE
symbol stemmed from xshared.h and its value clashed with OPT_PROTOCOL.
In practice, this turned verbose mode on for rules with protocol match.

Fix all the above by merging the different OPT_* symbols in the first
three patches.

The second more relevant issue was ebtables' lack of support for '-p
LENGTH', foremost a mandatory prerequisite for 802_3 extension matches
validity. The last two patches resolve this.

Phil Sutter (5):
  ebtables: Drop unused OPT_* defines
  ebtables: Eliminate OPT_TABLE
  ebtables: Merge OPT_* flags with xshared ones
  nft-shared: Introduce __get_cmp_data()
  ebtables: Support '-p Length'

 extensions/generic.txlate |  6 +++++
 extensions/libebt_802_3.t |  6 +++--
 iptables/nft-bridge.c     | 46 ++++++++++++++++++++++++++++++---------
 iptables/nft-shared.c     | 17 +++++++++------
 iptables/nft-shared.h     |  1 +
 iptables/xshared.h        |  5 +++++
 iptables/xtables-eb.c     | 28 ++++++------------------
 7 files changed, 69 insertions(+), 40 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-28 17:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-27 22:15 [iptables PATCH 0/5] Fixes around ebtables' --proto match Phil Sutter
2022-09-27 22:15 ` [iptables PATCH 1/5] ebtables: Drop unused OPT_* defines Phil Sutter
2022-09-27 22:15 ` [iptables PATCH 2/5] ebtables: Eliminate OPT_TABLE Phil Sutter
2022-09-27 22:15 ` [iptables PATCH 3/5] ebtables: Merge OPT_* flags with xshared ones Phil Sutter
2022-09-27 22:15 ` [iptables PATCH 4/5] nft-shared: Introduce __get_cmp_data() Phil Sutter
2022-09-27 22:15 ` [iptables PATCH 5/5] ebtables: Support '-p Length' Phil Sutter
2022-09-28 17:20   ` Phil Sutter
2022-09-28 11:42 ` [iptables PATCH 0/5] Fixes around ebtables' --proto match Florian Westphal

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).