From: Phil Sutter Date: Fri, 3 Aug 2018 15:26:46 +0000 (+0200) Subject: xtables: Reserve space for 'opt' column in ip6tables output X-Git-Tag: v1.8.1~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd79556bfa15056f2a430e57993a2a64c734b3cf;p=thirdparty%2Fiptables.git 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 --- 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);