]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables: Reserve space for 'opt' column in ip6tables output
authorPhil Sutter <phil@nwl.cc>
Fri, 3 Aug 2018 15:26:46 +0000 (17:26 +0200)
committerFlorian Westphal <fw@strlen.de>
Sat, 4 Aug 2018 21:40:13 +0000 (23:40 +0200)
Although ip6tables does not support matching on fragments, the 'opt'
column is included in ruleset listing nevertheless. So
nft_ipv6_print_rule() has to fill that space up with blanks.

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

index 5315aba647be3d0fd50ecfbe6fa8a8248381a8af..fa5b8c89f3db630f652e808b7f12eb68c4fbe342 100644 (file)
@@ -240,6 +240,11 @@ static void nft_ipv6_print_rule(struct nftnl_rule *r, unsigned int num,
        print_rule_details(&cs, cs.jumpto, cs.fw6.ipv6.flags,
                           cs.fw6.ipv6.invflags, cs.fw6.ipv6.proto,
                           num, format);
+       if (format & FMT_OPTIONS) {
+               if (format & FMT_NOTABLE)
+                       fputs("opt ", stdout);
+               fputs("   ", stdout);
+       }
        print_ifaces(cs.fw6.ipv6.iniface, cs.fw6.ipv6.outiface,
                     cs.fw6.ipv6.invflags, format);
        print_ipv6_addr(&cs, format);