From 69ceee5ebe1a57b274cbadbe918d9763c5bd85b3 Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Fri, 16 May 2008 14:52:12 +0200 Subject: fix ip6tables dest address printing http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=464244 ip6tables improperly displays the destination address when the address is longer than 18 characters. Here is example output: ... DROP tcp 2001:db8::/32 2001:db8:3:4:5:6:7:8/128tcp spt:25 ... Proper formatting should have a space between '2001:db8:3:4:5:6:7:8/128' and 'tcp'. Signed-off-by: Jamie Strandboge Signed-off-by: Lawrence J. Lane Signed-off-by: Patrick McHardy --- ip6tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ip6tables.c') diff --git a/ip6tables.c b/ip6tables.c index 9b68fba3..8e135f16 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -810,14 +810,14 @@ print_firewall(const struct ip6t_entry *fw, fputc(fw->ipv6.invflags & IP6T_INV_DSTIP ? '!' : ' ', stdout); if (!memcmp(&fw->ipv6.dmsk, &in6addr_any, sizeof in6addr_any) && !(format & FMT_NUMERIC)) - printf(FMT("%-19s","-> %s"), "anywhere"); + printf(FMT("%-19s ","-> %s"), "anywhere"); else { if (format & FMT_NUMERIC) sprintf(buf, "%s", ip6addr_to_numeric(&fw->ipv6.dst)); else sprintf(buf, "%s", ip6addr_to_anyname(&fw->ipv6.dst)); strcat(buf, ip6mask_to_numeric(&fw->ipv6.dmsk)); - printf(FMT("%-19s","-> %s"), buf); + printf(FMT("%-19s ","-> %s"), buf); } if (format & FMT_NOTABLE) -- cgit v1.2.3