diff options
author | Phil Sutter <phil@nwl.cc> | 2019-10-22 20:06:11 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-11-23 15:01:23 +0100 |
commit | a323c28331a4807252b11a7a078dc68af82399ef (patch) | |
tree | 2ff3f5d9f69c5897adb4bb515c452497b0f75f54 /iptables/ip6tables.c | |
parent | 1d73cec02c8d9a0f5bfbd2983c36cc1228b78f45 (diff) |
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/ip6tables.c')
-rw-r--r-- | iptables/ip6tables.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c index e0cc4e89..3d304d44 100644 --- a/iptables/ip6tables.c +++ b/iptables/ip6tables.c @@ -332,13 +332,7 @@ print_firewall(const struct ip6t_entry *fw, print_rule_details(num, &fw->counters, targname, fw->ipv6.proto, fw->ipv6.flags, fw->ipv6.invflags, format); - if (format & FMT_OPTIONS) { - if (format & FMT_NOTABLE) - fputs("opt ", stdout); - fputc(' ', stdout); /* Invert flag of FRAG */ - fputc(' ', stdout); /* -f */ - fputc(' ', stdout); - } + print_fragment(fw->ipv6.flags, fw->ipv6.invflags, format, true); print_ifaces(fw->ipv6.iniface, fw->ipv6.outiface, fw->ipv6.invflags, format); |