]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
arptables: Print policy only for base chains
authorPhil Sutter <phil@nwl.cc>
Thu, 2 Aug 2018 15:05:26 +0000 (17:05 +0200)
committerFlorian Westphal <fw@strlen.de>
Sat, 4 Aug 2018 12:59:58 +0000 (14:59 +0200)
Printing a policy for user-defined chains is pointless.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/nft-arp.c

index 328c791db42a810a6c57706e921e1c0d7af03004..5cabb93e4a9bcc60dc84a61a5d18be720ed1794f 100644 (file)
@@ -421,7 +421,7 @@ static void nft_arp_print_header(unsigned int format, const char *chain,
                                 bool basechain, uint32_t refs)
 {
        printf("Chain %s", chain);
-       if (pol) {
+       if (basechain && pol) {
                printf(" (policy %s", pol);
                if (!(format & FMT_NOCOUNTS)) {
                        fputc(' ', stdout);