From cd79556bfa15056f2a430e57993a2a64c734b3cf Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 3 Aug 2018 17:26:46 +0200 Subject: xtables: Reserve space for 'opt' column in ip6tables output 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 Signed-off-by: Florian Westphal --- iptables/nft-ipv6.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'iptables/nft-ipv6.c') diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 5315aba6..fa5b8c89 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -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); -- cgit v1.2.3