Skip to content

Some more code de-duplication

Phil Sutter netfilter-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 1 replyIn review
  2. v26 patches 2 repliesSuperseded
  3. v16 patches 2 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xshared: Share print_match_save() between legacy ip*tablesiptables/ip6tables.c iptables/iptables.c iptables/xshared.c +1 more+32 -620 replies
2/6xshared: Share a common printhelp functioniptables/ip6tables.c iptables/iptables.c iptables/xshared.c +2 more+108 -2390 replies
3/6xshared: Share exit_tryhelp()iptables/ip6tables.c iptables/iptables.c iptables/xshared.c +2 more+24 -460 replies
4/6xtables_globals: Embed variant name in .program_versioniptables/ip6tables.c iptables/iptables-restore.c iptables/iptables-save.c +6 more+16 -160 replies
5/6libxtables: Extend basic_exit_err()iptables/ip6tables.c iptables/iptables.c iptables/xtables-arp.c +3 more+12 -720 replies
6/6iptables-*-restore: Drop pointless line referenceiptables/ip6tables.c iptables/iptables.c iptables/xtables-eb.c +1 more+8 -80 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 0/6] Some more code de-duplication

No change in patches 1 to 3 and 6.

Patch 4 is new: Extend program_version field with variant string instead of introducing a separate field. This made patch 5 a bit smaller, due to less differences between basic_exit_err() and xtables_exit_error().

Phil Sutter (6):
xshared: Share print_match_save() between legacy ip*tables
xshared: Share a common printhelp function
xshared: Share exit_tryhelp()
xtables_globals: Embed variant name in .program_version
libxtables: Extend basic_exit_err() iptables-*-restore: Drop pointless line reference

 iptables/ip6tables.c        | 157 ++----------------------------------
 iptables/iptables-restore.c |   2 +-
 iptables/iptables-save.c    |   2 +-
 iptables/iptables.c         | 157 ++----------------------------------
 iptables/xshared.c          | 143 ++++++++++++++++++++++++++++++++
 iptables/xshared.h          |   5 ++
 iptables/xtables-arp.c      |   4 +-
 iptables/xtables-eb.c       |  10 +--
 iptables/xtables-restore.c  |   2 +-
 iptables/xtables-save.c     |   2 +-
 iptables/xtables.c          | 135 +++----------------------------
 libxtables/xtables.c        |  12 +++
 12 files changed, 194 insertions(+), 437 deletions(-)
Signature · 1 line
2.33.0