summaryrefslogtreecommitdiffstats
path: root/iptables/nft-ipv6.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-11-05 17:45:48 +0100
committerPhil Sutter <phil@nwl.cc>2021-11-23 15:01:23 +0100
commitb5881e7f22d42a8b00acbdbab296b71572ddb903 (patch)
treea6b2d0229c82398d3960d86a221e462098666060 /iptables/nft-ipv6.c
parent1189d830ea4fd269da87761d400ebabca02e1ef3 (diff)
nft: Change whitespace printing in save_rule callback
This aligns whitespace printing with legacy iptables' print_rule4() in order to prepare for further code-sharing. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft-ipv6.c')
-rw-r--r--iptables/nft-ipv6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c
index f0e64bbd..845937b1 100644
--- a/iptables/nft-ipv6.c
+++ b/iptables/nft-ipv6.c
@@ -234,14 +234,14 @@ static void save_ipv6_addr(char letter, const struct in6_addr *addr,
if (!invert && l == 0)
return;
- printf("%s-%c %s",
- invert ? "! " : "", letter,
+ printf("%s -%c %s",
+ invert ? " !" : "", letter,
inet_ntop(AF_INET6, addr, addr_str, sizeof(addr_str)));
if (l == -1)
- printf("/%s ", inet_ntop(AF_INET6, mask, addr_str, sizeof(addr_str)));
+ printf("/%s", inet_ntop(AF_INET6, mask, addr_str, sizeof(addr_str)));
else
- printf("/%d ", l);
+ printf("/%d", l);
}
static void nft_ipv6_save_rule(const void *data, unsigned int format)