netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iptables PATCH 0/7] tests: xlate: generic.txlate to pass replay test
@ 2022-12-01 16:39 Phil Sutter
  2022-12-01 16:39 ` [iptables PATCH 1/7] ebtables: Implement --check command Phil Sutter
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Phil Sutter @ 2022-12-01 16:39 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

Instead of dumping the ruleset with xtables-save and creating yet
another string comparison mess by searching the output, use --check
command to leverage iptables' internal rule comparison functionality
when checking that the nftables-created rule parses correctly as the
source of the translation (patch 2).

There was a rub with the above, namely ebtables not supporting --check
in the first place. Gladly the implementation is pretty simple (patch
1) with one caveat: '-C' itself is not available so add the long option
only.

The remaining patches deal with translation details (mostly around
wildcard interface names) until generic.txlate finally passes the replay
test.

Phil Sutter (7):
  ebtables: Implement --check command
  tests: xlate: Use --check to verify replay
  nft: Fix for comparing ifname matches against nft-generated ones
  nft: Fix match generator for '! -i +'
  nft: Recognize INVAL/D interface name
  xtables-translate: Fix for interfaces with asterisk mid-string
  ebtables: Fix MAC address match translation

 extensions/generic.txlate    | 16 ++++++-------
 iptables/nft-bridge.c        |  6 ++---
 iptables/nft-shared.c        | 27 ++++++++++++++++++++-
 iptables/xtables-eb.c        | 12 +++++++---
 iptables/xtables-translate.c |  4 +++-
 xlate-test.py                | 46 ++++++++++++++----------------------
 6 files changed, 67 insertions(+), 44 deletions(-)

-- 
2.38.0


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

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

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-01 16:39 [iptables PATCH 0/7] tests: xlate: generic.txlate to pass replay test Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 1/7] ebtables: Implement --check command Phil Sutter
2022-12-08 21:40   ` Pablo Neira Ayuso
2022-12-09  0:41     ` Phil Sutter
2022-12-09 15:23       ` Pablo Neira Ayuso
2022-12-09 16:51         ` Phil Sutter
2022-12-09 20:09           ` Pablo Neira Ayuso
2022-12-01 16:39 ` [iptables PATCH 2/7] tests: xlate: Use --check to verify replay Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 3/7] nft: Fix for comparing ifname matches against nft-generated ones Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 4/7] nft: Fix match generator for '! -i +' Phil Sutter
2022-12-08 12:23   ` Pablo Neira Ayuso
2022-12-08 13:19     ` Phil Sutter
2022-12-08 20:31       ` Pablo Neira Ayuso
2022-12-09  0:25         ` Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 5/7] nft: Recognize INVAL/D interface name Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 6/7] xtables-translate: Fix for interfaces with asterisk mid-string Phil Sutter
2022-12-01 16:39 ` [iptables PATCH 7/7] ebtables: Fix MAC address match translation Phil Sutter
2022-12-02  0:46 ` [iptables PATCH 0/7] tests: xlate: generic.txlate to pass replay test Phil Sutter

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