All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 0/6] Some more code de-duplication
Date: Thu,  9 Dec 2021 01:22:51 +0100	[thread overview]
Message-ID: <20211209002257.21467-1-phil@nwl.cc> (raw)

Patch 1 merges a common function in legacy ip*tables, the remaining
ones deal with help printing:

Patch 2 merges the three almost identical copies of iptables help text
into a single function.

Patches 3, 4 and 5 extend libxtables enough to provide a default
exit_err callback which all ip*tables may use as-is.

Patch 6 removes duplicated info from output in a specific error
condition. The benefit here is mostly that there are four spots less
which make use of that global 'line' variable.

Phil Sutter (6):
  xshared: Share print_match_save() between legacy ip*tables
  xshared: Share a common printhelp function
  libxtables: Add xtables_exit_tryhelp()
  xtables_globals: Introduce program_variant
  libxtables: Extend basic_exit_err()
  iptables-*-restore: Drop pointless line reference

 include/xtables.h      |   3 +-
 iptables/ip6tables.c   | 154 ++---------------------------------------
 iptables/iptables.c    | 154 ++---------------------------------------
 iptables/xshared.c     | 133 +++++++++++++++++++++++++++++++++++
 iptables/xshared.h     |   4 ++
 iptables/xtables-arp.c |   3 +-
 iptables/xtables-eb.c  |   7 +-
 iptables/xtables.c     | 132 +++--------------------------------
 libxtables/xtables.c   |  26 ++++++-
 9 files changed, 190 insertions(+), 426 deletions(-)

-- 
2.33.0


             reply	other threads:[~2021-12-09  0:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  0:22 Phil Sutter [this message]
2021-12-09  0:22 ` [iptables PATCH 1/6] xshared: Share print_match_save() between legacy ip*tables Phil Sutter
2021-12-09  0:22 ` [iptables PATCH 2/6] xshared: Share a common printhelp function Phil Sutter
2021-12-09  0:22 ` [iptables PATCH 3/6] libxtables: Add xtables_exit_tryhelp() Phil Sutter
2021-12-09  0:37   ` Pablo Neira Ayuso
2021-12-09  2:05     ` Phil Sutter
2021-12-09  0:22 ` [iptables PATCH 4/6] xtables_globals: Introduce program_variant Phil Sutter
2021-12-09  0:22 ` [iptables PATCH 5/6] libxtables: Extend basic_exit_err() Phil Sutter
2021-12-09  0:22 ` [iptables PATCH 6/6] iptables-*-restore: Drop pointless line reference Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211209002257.21467-1-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.