[netfilter-cvslog] r6706 - trunk/iptables

yasuyuki at netfilter.org yasuyuki at netfilter.org
Sat Dec 9 14:06:05 CET 2006


Author: yasuyuki at netfilter.org
Date: 2006-12-09 14:06:04 +0100 (Sat, 09 Dec 2006)
New Revision: 6706

Modified:
   trunk/iptables/Makefile
   trunk/iptables/ip6tables-restore.c
   trunk/iptables/iptables-multi.c
   trunk/iptables/iptables-restore.c
   trunk/iptables/iptables-xml.c
Log:
fix compile/install error for iptables-xml with DO_MULTI=1 (Lutz Jaenicke)



Modified: trunk/iptables/Makefile
===================================================================
--- trunk/iptables/Makefile	2006-12-06 10:09:47 UTC (rev 6705)
+++ trunk/iptables/Makefile	2006-12-09 13:06:04 UTC (rev 6706)
@@ -170,7 +170,7 @@
 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
 
 ifeq ($(DO_MULTI), 1)
-$(DESTDIR)$(BINDIR)/iptables-xml: iptables-xml
+$(DESTDIR)$(BINDIR)/iptables-xml: iptables
 	@[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
 	ln -sf $< $@
 else

Modified: trunk/iptables/ip6tables-restore.c
===================================================================
--- trunk/iptables/ip6tables-restore.c	2006-12-06 10:09:47 UTC (rev 6705)
+++ trunk/iptables/ip6tables-restore.c	2006-12-09 13:06:04 UTC (rev 6706)
@@ -74,7 +74,7 @@
 	return handle;
 }
 
-int parse_counters(char *string, struct ip6t_counters *ctr)
+static int parse_counters(char *string, struct ip6t_counters *ctr)
 {
 	return (sscanf(string, "[%llu:%llu]", (unsigned long long *)&ctr->pcnt, (unsigned long long *)&ctr->bcnt) == 2);
 }

Modified: trunk/iptables/iptables-multi.c
===================================================================
--- trunk/iptables/iptables-multi.c	2006-12-06 10:09:47 UTC (rev 6705)
+++ trunk/iptables/iptables-multi.c	2006-12-09 13:06:04 UTC (rev 6706)
@@ -6,6 +6,7 @@
 int iptables_main(int argc, char **argv);
 int iptables_save_main(int argc, char **argv);
 int iptables_restore_main(int argc, char **argv);
+int iptables_xml_main(int argc, char **argv);
 
 int main(int argc, char **argv) {
   char *progname;
@@ -25,6 +26,9 @@
     if (!strcmp(progname, "iptables-restore"))
       return iptables_restore_main(argc, argv);
     
+    if (!strcmp(progname, "iptables-xml"))
+      return iptables_xml_main(argc, argv);
+    
     fprintf(stderr, "iptables multi-purpose version: unknown applet name %s\n", progname);
     exit(1);
   }

Modified: trunk/iptables/iptables-restore.c
===================================================================
--- trunk/iptables/iptables-restore.c	2006-12-06 10:09:47 UTC (rev 6705)
+++ trunk/iptables/iptables-restore.c	2006-12-09 13:06:04 UTC (rev 6706)
@@ -71,7 +71,7 @@
 	return handle;
 }
 
-int parse_counters(char *string, struct ipt_counters *ctr)
+static int parse_counters(char *string, struct ipt_counters *ctr)
 {
 	return (sscanf(string, "[%llu:%llu]", (unsigned long long *)&ctr->pcnt, (unsigned long long *)&ctr->bcnt) == 2);
 }

Modified: trunk/iptables/iptables-xml.c
===================================================================
--- trunk/iptables/iptables-xml.c	2006-12-06 10:09:47 UTC (rev 6705)
+++ trunk/iptables/iptables-xml.c	2006-12-09 13:06:04 UTC (rev 6706)
@@ -26,10 +26,10 @@
 /* no need to link with iptables.o */
 const char *program_name;
 const char *program_version;
+
+#ifndef IPTABLES_MULTI
 int line = 0;
-
-void
-exit_error(enum exittype status, char *msg, ...)
+void exit_error(enum exittype status, char *msg, ...)
 {
 	va_list args;
 
@@ -41,6 +41,7 @@
 	/* On error paths, make sure that we don't leak memory */
 	exit(status);
 }
+#endif
 
 static void print_usage(const char *name, const char *version)
 	    __attribute__ ((noreturn));
@@ -66,7 +67,7 @@
 	exit(1);
 }
 
-int
+static int
 parse_counters(char *string, struct ipt_counters *ctr)
 {
 	if (string != NULL)
@@ -605,7 +606,7 @@
 
 #ifdef IPTABLES_MULTI
 int
-iptables_restore_main(int argc, char *argv[])
+iptables_xml_main(int argc, char *argv[])
 #else
 int
 main(int argc, char *argv[])




More information about the netfilter-cvslog mailing list