]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: Revert --literal, add -S/--service
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 24 Oct 2018 15:37:47 +0000 (17:37 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 29 Oct 2018 14:07:34 +0000 (15:07 +0100)
commita42d2865bc7e96fe63276e22acd523d996aaf0a4
treeb0779465bba8cf7562628ae884278fed73963362
parentf27fc14cbd3097e98c4d3549ff93c9284134b866
src: Revert --literal, add -S/--service

This is a partial revert of b0f6a45b25dd1 ("src: add --literal option")
which was added during the development cycle before 0.9.1 is released.

After looking at patch: https://patchwork.ozlabs.org/patch/969864/ that
allows to print priority, uid, gid and protocols as numerics, I decided
to revisit this to provide individual options to turn on literal
printing.

What I'm proposing is to provide a good default for everyone, and
provide options to turn on literal/numeric printing.

This patch adds nft_ctx_output_{set,get}_flags() and define two flags to
enable reverse DNS lookups and to print ports as service names.

This patch introduces -S/--services, to print service names as per
/etc/services.

Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
doc/libnftables.adoc
doc/nft.txt
include/nftables.h
include/nftables/libnftables.h
src/datatype.c
src/expression.c
src/json.c
src/libnftables.c
src/main.c