[netfilter-cvslog] r6700 - trunk/iptables

kaber at netfilter.org kaber at netfilter.org
Sat Dec 2 18:17:33 CET 2006


Author: kaber at netfilter.org
Date: 2006-12-02 18:17:33 +0100 (Sat, 02 Dec 2006)
New Revision: 6700

Modified:
   trunk/iptables/ip6tables-save.c
   trunk/iptables/iptables-save.c
Log:
Fix iptables-save not printing -s !0/0 and -d !0/0 as well as ip6tables
unnecessarily printing the address. Base on patch by Daniel De Graaf.


Modified: trunk/iptables/ip6tables-save.c
===================================================================
--- trunk/iptables/ip6tables-save.c	2006-11-29 13:32:32 UTC (rev 6699)
+++ trunk/iptables/ip6tables-save.c	2006-12-02 17:17:33 UTC (rev 6700)
@@ -125,7 +125,7 @@
 	char buf[51];
 	int l = ipv6_prefix_length(mask);
 
-	if (!mask && !ip)
+	if (l == 0 && !invert)
 		return;
 
 	printf("%s %s%s",

Modified: trunk/iptables/iptables-save.c
===================================================================
--- trunk/iptables/iptables-save.c	2006-11-29 13:32:32 UTC (rev 6699)
+++ trunk/iptables/iptables-save.c	2006-12-02 17:17:33 UTC (rev 6700)
@@ -141,7 +141,7 @@
 /* print a given ip including mask if neccessary */
 static void print_ip(char *prefix, u_int32_t ip, u_int32_t mask, int invert)
 {
-	if (!mask && !ip)
+	if (!mask && !ip && !invert)
 		return;
 
 	printf("%s %s%u.%u.%u.%u",




More information about the netfilter-cvslog mailing list