[netfilter-cvslog] r3863 - trunk/iptables

laforge at netfilter.org laforge at netfilter.org
Fri Apr 15 11:35:24 CEST 2005


Author: laforge at netfilter.org
Date: 2005-04-15 11:35:24 +0200 (Fri, 15 Apr 2005)
New Revision: 3863

Modified:
   trunk/iptables/iptables-save.c
   trunk/iptables/iptables.c
Log:
fix iptables-save/restore of goto (Jonas Berlin)


Modified: trunk/iptables/iptables-save.c
===================================================================
--- trunk/iptables/iptables-save.c	2005-04-15 09:30:41 UTC (rev 3862)
+++ trunk/iptables/iptables-save.c	2005-04-15 09:35:24 UTC (rev 3863)
@@ -197,7 +197,7 @@
 	/* Print target name */	
 	target_name = iptc_get_target(e, h);
 	if (target_name && (*target_name != '\0'))
-		printf("-j %s ", target_name);
+		printf("-%c %s ", e->ip.flags & IPT_F_GOTO ? 'g' : 'j', target_name);
 
 	/* Print targinfo part */
 	t = ipt_get_target((struct ipt_entry *)e);

Modified: trunk/iptables/iptables.c
===================================================================
--- trunk/iptables/iptables.c	2005-04-15 09:30:41 UTC (rev 3862)
+++ trunk/iptables/iptables.c	2005-04-15 09:35:24 UTC (rev 3863)
@@ -1393,6 +1393,9 @@
 	if (format & FMT_NOTABLE)
 		fputs("  ", stdout);
 
+	if(fw->ip.flags & IPT_F_GOTO)
+		printf("[goto] ");
+
 	IPT_MATCH_ITERATE(fw, print_match, &fw->ip, format & FMT_NUMERIC);
 
 	if (target) {




More information about the netfilter-cvslog mailing list