From a323c28331a4807252b11a7a078dc68af82399ef Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 22 Oct 2019 20:06:11 +0200 Subject: xshared: Share print_fragment() with legacy Also add a fake mode to make it suitable for ip6tables. This is required because IPT_F_FRAG value clashes with IP6T_F_PROTO, so ip6tables rules might seem to have IPT_F_FRAG bit set. While being at it, drop the local variable 'flags' from print_firewall(). Signed-off-by: Phil Sutter --- iptables/nft-ipv6.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'iptables/nft-ipv6.c') diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index cb83f9e1..13213088 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -200,11 +200,7 @@ static void nft_ipv6_print_rule(struct nft_handle *h, struct nftnl_rule *r, print_rule_details(num, &cs.counters, cs.jumpto, cs.fw6.ipv6.proto, cs.fw6.ipv6.flags, cs.fw6.ipv6.invflags, format); - if (format & FMT_OPTIONS) { - if (format & FMT_NOTABLE) - fputs("opt ", stdout); - fputs(" ", stdout); - } + print_fragment(cs.fw6.ipv6.flags, cs.fw6.ipv6.invflags, format, true); print_ifaces(cs.fw6.ipv6.iniface, cs.fw6.ipv6.outiface, cs.fw6.ipv6.invflags, format); print_ipv6_addresses(&cs.fw6, format); -- cgit v1.2.3