[netfilter-cvslog] r7528 - trunk/iptables

pablo at netfilter.org pablo at netfilter.org
Thu May 15 16:36:22 CEST 2008


Author: pablo at netfilter.org
Date: 2008-05-15 16:36:22 +0200 (Thu, 15 May 2008)
New Revision: 7528

Modified:
   trunk/iptables/ip6tables.c
Log:
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:
# 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'.

Signed-off-by: Jamie Strandboge <jamie at ubuntu.com>
Signed-off-by: Lawrence J. Lane <ljlane at debian.org>


Modified: trunk/iptables/ip6tables.c
===================================================================
--- trunk/iptables/ip6tables.c	2008-05-14 17:49:10 UTC (rev 7527)
+++ trunk/iptables/ip6tables.c	2008-05-15 14:36:22 UTC (rev 7528)
@@ -810,14 +810,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", 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)




More information about the netfilter-cvslog mailing list