diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-07-03 17:24:05 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-07-07 20:53:11 +0200 |
commit | b0f6a45b25dd1b8e4ab0e3b2dd2a00d918ae29c0 (patch) | |
tree | d2d457d0b8384aee1f7a6d176c21ec9cf8814db6 /src/libnftables.c | |
parent | 1dc9be8445265498a2db534ae254260b6e7dd75b (diff) |
src: add --literal option
Default not to print the service name as we discussed during the NFWS.
# nft list ruleset
table ip x {
chain y {
tcp dport 22
ip saddr 1.1.1.1
}
}
# nft -l list ruleset
table ip x {
chain y {
tcp dport ssh
ip saddr 1.1.1.1
}
}
# nft -ll list ruleset
table ip x {
chain y {
tcp dport 22
ip saddr 1dot1dot1dot1.cloudflare-dns.com
}
}
Then, -ll displays FQDN. just like the (now deprecated) --ip2name (-N)
option.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/libnftables.c')
-rw-r--r-- | src/libnftables.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libnftables.c b/src/libnftables.c index 9a97a3c5..656b0a1c 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -336,14 +336,14 @@ void nft_ctx_output_set_stateless(struct nft_ctx *ctx, bool val) ctx->output.stateless = val; } -bool nft_ctx_output_get_ip2name(struct nft_ctx *ctx) +enum nft_literal_level nft_ctx_output_get_literal(struct nft_ctx *ctx) { - return ctx->output.ip2name; + return ctx->output.literal; } -void nft_ctx_output_set_ip2name(struct nft_ctx *ctx, bool val) +void nft_ctx_output_set_literal(struct nft_ctx *ctx, enum nft_literal_level val) { - ctx->output.ip2name = val; + ctx->output.literal = val; } unsigned int nft_ctx_output_get_debug(struct nft_ctx *ctx) |