Skip to content

nftables to ipset translation infrastructure

Pablo Neira Ayuso netfilter-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyIn review
  2. v31 of 3 patches 0 repliesSuperseded
  3. v21 patch 0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4lib: split parser from command executionlib/ipset.c+30 -140 replies
2/4lib: Detach restore routine from parserlib/ipset.c+4 -10 replies
3/4add ipset to nftables translation infrastructureconfigure.ac include/libipset/Makefile.am include/libipset/xlate.h +4 more+654 -40 replies
4/4tests: add tests ipset to nftablestests/xlate/runtest.sh tests/xlate/xlate.t tests/xlate/xlate.t.nft+140 -00 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH ipset,v4 0/4] nftables to ipset translation infrastructure

Hi Jozsef,

This v4 of the patchset to add the ipset to nftables translation utility. Example invocation of this new tool is the following:

	# ipset-translate restore < file.ipset

This v4 round includes:

- regression tests: there is at least one test for each ipset type.
- many bugfixes that have been spotted by the regression test infrastructure.
- Disentanglement of the ipset_xlate() logic for ADT commands.

to run regression tests:

	# cd tests/xlate
	# ./runtest.sh
	[OK] tests are fine!

The xlate.t file contains the ipset set definitions, then the xlate.t.nft file contains the expected output in nftables syntax. In case that there is a mismatch, the diff with the expected output is provided.

Please, apply, thanks!

Pablo Neira Ayuso (4):
lib: split parser from command execution
lib: Detach restore routine from parser add ipset to nftables translation infrastructure
tests: add tests ipset to nftables

 configure.ac                 |   1 +
 include/libipset/Makefile.am |   3 +-
 include/libipset/xlate.h     |   6 +
 lib/ipset.c                  | 588 ++++++++++++++++++++++++++++++++++-
 src/Makefile.am              |   8 +-
 src/ipset-translate.8        |  91 ++++++
 src/ipset.c                  |   8 +-
 tests/xlate/runtest.sh       |  29 ++
 tests/xlate/xlate.t          |  55 ++++
 tests/xlate/xlate.t.nft      |  56 ++++
 10 files changed, 827 insertions(+), 18 deletions(-)
 create mode 100644 include/libipset/xlate.h
 create mode 100644 src/ipset-translate.8
 create mode 100755 tests/xlate/runtest.sh
 create mode 100644 tests/xlate/xlate.t
 create mode 100644 tests/xlate/xlate.t.nft
Signature · 1 line
2.20.1