[pkg-netfilter-team] Bug#926411: Export to json/xml doesn't work

jaroslav at thinline.cz jaroslav at thinline.cz
Thu Apr 4 18:23:02 BST 2019


Package: nftables
Version: 0.9.0-2
Severity: normal

Hello,

according to the nft man page, it is possible to export current ruleset
to JSON or XML format using this command:

nft export [ruleset] format

where format is a mandatory parameter and "may be either xml or json". 
Using
the export command without format indeed raises an error:

# nft export
Error: syntax error, unexpected newline, expecting ruleset or xml or 
json or vm

However, adding the format does not work either:

# nft export json
Error: this output type is not supported

This used to work in nftables 0.7-1 in Stretch (example with no rules 
present)

# nft export json
{"nftables":[]}

Export to JSON allows automated processing of the ruleset and it would 
be nice
to have it functional. Or - if the current state is not a regression but
an intentional change - it should be reflected in the man page.

Thanks


-- System Information:
Debian Release: buster/sid
   APT prefers testing
   APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages nftables depends on:
ii  dpkg          1.19.5
ii  libc6         2.28-8
ii  libgmp10      2:6.1.2+dfsg-4
ii  libjansson4   2.12-1
ii  libnftables0  0.9.0-2
ii  libreadline7  7.0-5

nftables recommends no packages.

nftables suggests no packages.

-- no debconf information



More information about the pkg-netfilter-team mailing list