diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-29 16:03:32 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-10-30 10:29:44 +0100 |
commit | 505794f75f2a342e8f8115eb0f04965979f2b634 (patch) | |
tree | cba6b69cdb44a5708664be33229b7b5d935325f4 /tests | |
parent | 92abc51d3580dc719fdcbca8d36fdcf5a3751be5 (diff) |
src: get rid of nft_ctx_output_{get,set}_numeric()
This patch adds NFT_CTX_OUTPUT_NUMERIC_SYMBOL, which replaces the last
client of the numeric level approach.
This patch updates `-n' option semantics to display all output
numerically.
Note that monitor code was still using the -n option to skip printing
the process name, this patch updates that path too to print it
inconditionally to simplify things.
Given the numeric levels have no more clients after this patch, remove
that code.
Update several tests/shell not to use -nn.
This patch adds NFT_CTX_OUTPUT_NUMERIC_ALL which enables all flags to
provide a fully numerical output.
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shell/testcases/netns/0001nft-f_0 | 2 | ||||
-rwxr-xr-x | tests/shell/testcases/netns/0002loosecommands_0 | 2 | ||||
-rwxr-xr-x | tests/shell/testcases/netns/0003many_0 | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/shell/testcases/netns/0001nft-f_0 b/tests/shell/testcases/netns/0001nft-f_0 index 64249826..83448087 100755 --- a/tests/shell/testcases/netns/0001nft-f_0 +++ b/tests/shell/testcases/netns/0001nft-f_0 @@ -90,7 +90,7 @@ if [ $? -ne 0 ] ; then exit 1 fi -KERNEL_RULESET="$($IP netns exec $NETNS_NAME $NFT list ruleset -nn)" +KERNEL_RULESET="$($IP netns exec $NETNS_NAME $NFT list ruleset)" $IP netns del $NETNS_NAME if [ "$RULESET" != "$KERNEL_RULESET" ] ; then DIFF="$(which diff)" diff --git a/tests/shell/testcases/netns/0002loosecommands_0 b/tests/shell/testcases/netns/0002loosecommands_0 index 3910446a..e6278280 100755 --- a/tests/shell/testcases/netns/0002loosecommands_0 +++ b/tests/shell/testcases/netns/0002loosecommands_0 @@ -53,7 +53,7 @@ RULESET="table ip t { } }" -KERNEL_RULESET="$($IP netns exec $NETNS_NAME $NFT list ruleset -nn)" +KERNEL_RULESET="$($IP netns exec $NETNS_NAME $NFT list ruleset)" $IP netns del $NETNS_NAME if [ "$RULESET" != "$KERNEL_RULESET" ] ; then DIFF="$(which diff)" diff --git a/tests/shell/testcases/netns/0003many_0 b/tests/shell/testcases/netns/0003many_0 index 5ec4b2e4..61ad37bd 100755 --- a/tests/shell/testcases/netns/0003many_0 +++ b/tests/shell/testcases/netns/0003many_0 @@ -94,7 +94,7 @@ function test_netns() exit 1 fi - KERNEL_RULESET="$($IP netns exec $NETNS_NAME $NFT list ruleset -nn)" + KERNEL_RULESET="$($IP netns exec $NETNS_NAME $NFT list ruleset)" if [ "$RULESET" != "$KERNEL_RULESET" ] ; then echo "E: ruleset in netns $NETNS_NAME differs from the loaded" >&2 DIFF="$(which diff)" |