summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Strandboge <jamie@ubuntu.com>2008-05-16 14:52:12 +0200
committerPatrick McHardy <kaber@trash.net>2008-05-16 14:52:12 +0200
commit69ceee5ebe1a57b274cbadbe918d9763c5bd85b3 (patch)
tree7b98d6e3798565dec77aa46ceb4f11d17f791ef7
parent60a6073690a456770bf18d190beb57e8f2c8759f (diff)
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 <jamie@ubuntu.com> Signed-off-by: Lawrence J. Lane <ljlane@debian.org> Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r--ip6tables.c4
1 files changed, 2 insertions, 2 deletions
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)