Skip to content

Eliminate dedicated arptables-nft parser

Phil Sutter netfilter-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest13 patches 0 repliesNew
  2. v217 patches 3 repliesSuperseded
  3. v112 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Drop quirks for ignoring bogus table names and '-m' options, they likely just hide bugs.
- Rewrite empty interface name quirk patch, make arptables-nft print iptables' error message as warning to notify users.
- Integrate intrapositioned negation support into the final merge patch and revive iptables' old warning to notify users.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13nft: Introduce builtin_tables_lookup()iptables/nft.c iptables/nft.h iptables/xtables-arp.c +6 more+25 -240 replies
2/13xshared: Store optstring in xtables_globalsinclude/xtables.h iptables/xshared.h iptables/xtables-arp.c +2 more+10 -60 replies
3/13nft-shared: Introduce init_cs family ops callbackiptables/nft-arp.c iptables/nft-shared.h iptables/xtables.c+17 -50 replies
4/13xtables: Simplify addr_mask freeingiptables/nft-shared.h iptables/xtables.c+6 -110 replies
5/13nft: Add family ops callbacks wrapping different nft_cmd_* functionsiptables/nft-ipv4.c iptables/nft-ipv6.c iptables/nft-shared.h +1 more+228 -1770 replies
6/13xtables-standalone: Drop version number from init errorsiptables/xtables-standalone.c+4 -80 replies
7/13libxtables: Introduce xtables_globals print_help callbackinclude/xtables.h iptables/xtables-arp.c iptables/xtables.c+8 -30 replies
8/13arptables: Use standard data structures when parsingiptables/xtables-arp.c+138 -1420 replies
9/13nft-arp: Introduce post_parse callbackiptables/nft-arp.c iptables/nft-shared.h iptables/xtables-arp.c+178 -1280 replies
10/13nft-shared: Make nft_check_xt_legacy() family agnosticiptables/nft-shared.c+5 -00 replies
11/13xtables: Derive xtables_globals from familyiptables/xtables-arp-standalone.c iptables/xtables-eb-translate.c iptables/xtables-multi.h +2 more+23 -80 replies
12/13xtables: arptables accepts empty interface namesiptables/xtables.c+15 -80 replies
13/13nft: Merge xtables-arp-standalone.c into xtables-standalone.ciptables/Makefile.am iptables/nft-arp.c iptables/xtables-arp-standalone.c +4 more+218 -6990 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [iptables PATCH v3 00/13] Eliminate dedicated arptables-nft parser

Commandline parsing was widely identical with iptables and ip6tables. This series adds the necessary code-changes to unify the parsers into a common one.

Changes since v2:
- Drop quirks for ignoring bogus table names and '-m' options, they likely just hide bugs.
- Rewrite empty interface name quirk patch, make arptables-nft print iptables' error message as warning to notify users.
- Integrate intrapositioned negation support into the final merge patch and revive iptables' old warning to notify users.

Changes since v1:
- Fix patch 12, the parser has to check existence of proto_parse callback before dereferencing it. Otherwise arptables-nft segfaults if '-p' option is given.
- Patches 13-17 add all the arptables quirks to restore compatibility with arptables-legacy. I didn't consider them important enough to push them unless someone complains. Yet breaking existing scripts is bad indeed. Please consider them RFC: If you consider (one of) them not important, please NACk and I will drop them before pushing.

Phil Sutter (13):
nft: Introduce builtin_tables_lookup()
xshared: Store optstring in xtables_globals
nft-shared: Introduce init_cs family ops callback
xtables: Simplify addr_mask freeing
nft: Add family ops callbacks wrapping different nft_cmd_* functions
xtables-standalone: Drop version number from init errors
libxtables: Introduce xtables_globals print_help callback
arptables: Use standard data structures when parsing
nft-arp: Introduce post_parse callback
nft-shared: Make nft_check_xt_legacy() family agnostic
xtables: Derive xtables_globals from family
xtables: arptables accepts empty interface names
nft: Merge xtables-arp-standalone.c into xtables-standalone.c

 include/xtables.h                 |   2 +
 iptables/Makefile.am              |   2 +-
 iptables/nft-arp.c                | 252 +++++++++-
 iptables/nft-ipv4.c               |  93 ++++
 iptables/nft-ipv6.c               | 104 +++++
 iptables/nft-shared.c             |   5 +
 iptables/nft-shared.h             |  24 +
 iptables/nft.c                    |  19 +-
 iptables/nft.h                    |   2 +-
 iptables/xshared.h                |   2 +
 iptables/xtables-arp-standalone.c |  65 ---
 iptables/xtables-arp.c            | 749 +-----------------------------
 iptables/xtables-eb-translate.c   |   1 -
 iptables/xtables-eb.c             |   7 +-
 iptables/xtables-monitor.c        |   2 +-
 iptables/xtables-multi.h          |   3 +
 iptables/xtables-restore.c        |   9 +-
 iptables/xtables-save.c           |   6 +-
 iptables/xtables-standalone.c     |  54 ++-
 iptables/xtables-translate.c      |   7 +-
 iptables/xtables.c                | 348 ++++++--------
 21 files changed, 706 insertions(+), 1050 deletions(-)
 delete mode 100644 iptables/xtables-arp-standalone.c
Signature · 1 line
2.33.0