Skip to content

Share more code with legacy

Phil Sutter netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10xshared: Merge and share parse_chain()iptables/ip6tables.c iptables/iptables.c iptables/xshared.c +2 more+26 -590 replies
2/10nft: Change whitespace printing in save_rule callbackiptables/nft-arp.c iptables/nft-bridge.c iptables/nft-ipv4.c +3 more+30 -250 replies
3/10xshared: Share print_iface() functioniptables/ip6tables.c iptables/iptables.c iptables/nft-shared.c +2 more+33 -800 replies
4/10xshared: Share save_rule_details() with legacyiptables/ip6tables.c iptables/iptables.c iptables/nft-ipv4.c +5 more+50 -910 replies
5/10xshared: Share save_ipv{4,6}_addr() with legacyiptables/ip6tables.c iptables/iptables.c iptables/nft-ipv4.c +3 more+70 -1190 replies
6/10xshared: Share print_rule_details() with legacyiptables/ip6tables.c iptables/iptables.c iptables/nft-ipv4.c +5 more+37 -760 replies
7/10xshared: Share print_fragment() with legacyiptables/ip6tables.c iptables/iptables.c iptables/nft-ipv4.c +3 more+25 -350 replies
8/10xshared: Share print_header() with legacy iptablesiptables/ip6tables.c iptables/iptables.c iptables/nft-arp.c +6 more+82 -1610 replies
9/10nft-shared: Drop unused function print_proto()iptables/nft-shared.c iptables/nft-shared.h+0 -160 replies
10/10xshared: Make load_proto() staticiptables/xshared.c iptables/xshared.h+1 -20 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/10] Share more code with legacy

This series populates xshared.c with more code for use by both nft and legacy variants. A prerequisite for this is to change how output separating whitespace is printed (the old space before or after arg issue). Patch 2 does this and paves the way for patches 3-8. Patches 9 and 10 finish with a bit of cleanup.

Phil Sutter (10):
xshared: Merge and share parse_chain()
nft: Change whitespace printing in save_rule callback
xshared: Share print_iface() function
xshared: Share save_rule_details() with legacy
xshared: Share save_ipv{4,6}_addr() with legacy
xshared: Share print_rule_details() with legacy
xshared: Share print_fragment() with legacy
xshared: Share print_header() with legacy iptables
nft-shared: Drop unused function print_proto()
xshared: Make load_proto() static

 iptables/ip6tables.c  | 197 ++++-------------------------------
 iptables/iptables.c   | 210 ++++----------------------------------
 iptables/nft-arp.c    |   8 +-
 iptables/nft-bridge.c |  12 ++-
 iptables/nft-ipv4.c   |  75 ++------------
 iptables/nft-ipv6.c   |  37 ++-----
 iptables/nft-shared.c | 155 ++--------------------------
 iptables/nft-shared.h |  18 +---
 iptables/nft.c        |  10 +-
 iptables/xshared.c    | 231 +++++++++++++++++++++++++++++++++++++++++-
 iptables/xshared.h    |  22 +++-
 iptables/xtables.c    |   9 +-
 12 files changed, 337 insertions(+), 647 deletions(-)
Signature · 1 line
2.33.0