Package: iptables
Version: 1.3.8.0debian1-1
Severity: normal
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu hardy ubuntu-patch
ip6tables improperly displays the destination address when the address
is longer than 18 characters. Here is example output:
# ip6tables -L -n
...
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'.
Here is a patch to do just that:
--- iptables-1.3.8.0debian1.orig/iptables/ip6tables.c
+++ iptables-1.3.8.0debian1/iptables/ip6tables.c
@@ -1427,14 +1427,14 @@
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", addr_to_numeric(&(fw->ipv6.dst)));
else
sprintf(buf, "%s", addr_to_anyname(&(fw->ipv6.dst)));
strcat(buf, mask_to_numeric(&(fw->ipv6.dmsk)));
- printf(FMT("%-19s","-> %s"), buf);
+ printf(FMT("%-19s ","-> %s"), buf);
}
if (format & FMT_NOTABLE)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]