Skip to content

ebtables: Use the shared commandline parser

Phil Sutter netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13xshared: do_parse: Skip option checking for CMD_DELETE_NUMiptables/xshared.c+0 -10 replies
2/13xshared: Perform protocol value parsing in callbackiptables/xshared.c iptables/xshared.h+14 -90 replies
3/13xshared: Turn command_default() into a callbackiptables/ip6tables.c iptables/iptables.c iptables/nft-arp.c +4 more+12 -30 replies
4/13xshared: Introduce print_help callback (again)iptables/ip6tables.c iptables/iptables.c iptables/nft-arp.c +4 more+10 -30 replies
5/13xshared: Support rule range deletion in do_parse()iptables/xshared.c iptables/xshared.h+35 -10 replies
6/13xshared: Support for ebtables' --change-counters commandiptables/nft-cmd.h iptables/xshared.c iptables/xshared.h+66 -90 replies
7/13ebtables{,-translate}: Convert if-clause to switch()iptables/xtables-eb-translate.c iptables/xtables-eb.c+41 -290 replies
8/13ebtables: Change option values to avoid clashesiptables/xtables-eb-translate.c iptables/xtables-eb.c+19 -190 replies
9/13ebtables: Pass struct iptables_command_state to print_help()iptables/xtables-eb.c+5 -60 replies
10/13ebtables: Make 'h' case just a call to print_help()iptables/xshared.h iptables/xtables-eb.c+31 -310 replies
11/13ebtables: Use struct xt_cmd_parseiptables/xtables-eb.c+36 -230 replies
12/13xshared: Introduce option_test_and_reject()iptables/xshared.c+11 -100 replies
13/13ebtables: Use do_parse() from xsharediptables/nft-bridge.c iptables/nft-bridge.h iptables/nft.h +4 more+341 -10790 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [iptables PATCH 00/13] ebtables: Use the shared commandline parser

This series converts do_commandeb() and do_commandeb_xlate() to call do_parse() from xshared.c instead of iterating over argv themselves.

Patches 1-6 prepare the shared (parser) code for use by ebtables. Patches 7-11 prepare ebtables code for the following integration in patch 13. Patch 12 is a minor refactoring in xshared but fits fine right before the merge as the introduced helper function is called two more times by it.

Phil Sutter (13):
xshared: do_parse: Skip option checking for CMD_DELETE_NUM
xshared: Perform protocol value parsing in callback
xshared: Turn command_default() into a callback
xshared: Introduce print_help callback (again)
xshared: Support rule range deletion in do_parse()
xshared: Support for ebtables' --change-counters command ebtables{,-translate}: Convert if-clause to switch()
ebtables: Change option values to avoid clashes
ebtables: Pass struct iptables_command_state to print_help()
ebtables: Make 'h' case just a call to print_help()
ebtables: Use struct xt_cmd_parse
xshared: Introduce option_test_and_reject()
ebtables: Use do_parse() from xshared

 iptables/ip6tables.c            |   2 +
 iptables/iptables.c             |   2 +
 iptables/nft-arp.c              |   2 +
 iptables/nft-bridge.c           | 121 +++++
 iptables/nft-bridge.h           |  13 +-
 iptables/nft-cmd.h              |   7 -
 iptables/nft-ipv4.c             |   2 +
 iptables/nft-ipv6.c             |   2 +
 iptables/nft.h                  |   1 -
 iptables/xshared.c              | 218 +++++++--
 iptables/xshared.h              |  36 +-
 iptables/xtables-eb-translate.c | 491 +++----------------
 iptables/xtables-eb.c           | 839 ++++++--------------------------
 13 files changed, 567 insertions(+), 1169 deletions(-)
Signature · 1 line
2.41.0