[netfilter-cvslog] r3504 - in trunk/iptables: . include

gandalf at netfilter.org gandalf at netfilter.org
Mon Dec 27 20:49:29 CET 2004


Author: gandalf at netfilter.org
Date: 2004-12-27 20:49:28 +0100 (Mon, 27 Dec 2004)
New Revision: 3504

Modified:
   trunk/iptables/include/ip6tables.h
   trunk/iptables/include/iptables.h
   trunk/iptables/include/iptables_common.h
   trunk/iptables/ip6tables-restore.c
   trunk/iptables/ip6tables-save.c
   trunk/iptables/ip6tables-standalone.c
   trunk/iptables/ip6tables.c
   trunk/iptables/iptables-restore.c
   trunk/iptables/iptables-save.c
   trunk/iptables/iptables-standalone.c
   trunk/iptables/iptables.c
Log:
Fix setting lib_dir in ip*tables-{save,restore}


Modified: trunk/iptables/include/ip6tables.h
===================================================================
--- trunk/iptables/include/ip6tables.h	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/include/ip6tables.h	2004-12-27 19:49:28 UTC (rev 3504)
@@ -4,6 +4,10 @@
 #include "iptables_common.h"
 #include "libiptc/libip6tc.h"
 
+#ifndef IP6T_LIB_DIR
+#define IP6T_LIB_DIR "/usr/local/lib/iptables"
+#endif
+
 struct ip6tables_rule_match
 {
 	struct ip6tables_rule_match *next;

Modified: trunk/iptables/include/iptables.h
===================================================================
--- trunk/iptables/include/iptables.h	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/include/iptables.h	2004-12-27 19:49:28 UTC (rev 3504)
@@ -4,6 +4,10 @@
 #include "iptables_common.h"
 #include "libiptc/libiptc.h"
 
+#ifndef IPT_LIB_DIR
+#define IPT_LIB_DIR "/usr/local/lib/iptables"
+#endif
+
 #ifndef IPPROTO_SCTP
 #define IPPROTO_SCTP 132
 #endif

Modified: trunk/iptables/include/iptables_common.h
===================================================================
--- trunk/iptables/include/iptables_common.h	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/include/iptables_common.h	2004-12-27 19:49:28 UTC (rev 3504)
@@ -26,6 +26,7 @@
 void exit_error(enum exittype, char *, ...)__attribute__((noreturn,
 							  format(printf,2,3)));
 extern const char *program_name, *program_version;
+extern char *lib_dir;
 
 #ifdef NO_SHARED_LIBS
 # ifdef _INIT

Modified: trunk/iptables/ip6tables-restore.c
===================================================================
--- trunk/iptables/ip6tables-restore.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/ip6tables-restore.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -7,7 +7,7 @@
  * 	Rusty Russell <rusty at linuxcare.com.au>
  * This code is distributed under the terms of GNU GPL v2
  *
- * $Id: ip6tables-restore.c,v 1.22 2004/05/26 16:04:48 gandalf Exp $
+ * $Id$
  */
 
 #include <getopt.h>
@@ -116,6 +116,10 @@
 	program_version = IPTABLES_VERSION;
 	line = 0;
 
+	lib_dir = getenv("IP6TABLES_LIB_DIR");
+	if (!lib_dir)
+		lib_dir = IP6T_LIB_DIR;
+
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif

Modified: trunk/iptables/ip6tables-save.c
===================================================================
--- trunk/iptables/ip6tables-save.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/ip6tables-save.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -322,6 +322,10 @@
 	program_name = "ip6tables-save";
 	program_version = IPTABLES_VERSION;
 
+	lib_dir = getenv("IP6TABLES_LIB_DIR");
+	if (!lib_dir)
+		lib_dir = IP6T_LIB_DIR;
+
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif

Modified: trunk/iptables/ip6tables-standalone.c
===================================================================
--- trunk/iptables/ip6tables-standalone.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/ip6tables-standalone.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -46,6 +46,10 @@
 	program_name = "ip6tables";
 	program_version = IPTABLES_VERSION;
 
+	lib_dir = getenv("IP6TABLES_LIB_DIR");
+	if (!lib_dir)
+		lib_dir = IP6T_LIB_DIR;
+
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif

Modified: trunk/iptables/ip6tables.c
===================================================================
--- trunk/iptables/ip6tables.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/ip6tables.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -50,10 +50,6 @@
 #define FALSE 0
 #endif
 
-#ifndef IP6T_LIB_DIR
-#define IP6T_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
 #ifndef PROC_SYS_MODPROBE
 #define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
 #endif
@@ -195,9 +191,8 @@
 
 const char *program_version;
 const char *program_name;
+char *lib_dir;
 
-static char *lib_dir;
-
 /* Keeping track of external matches and targets: linked lists.  */
 struct ip6tables_match *ip6tables_matches = NULL;
 struct ip6tables_target *ip6tables_targets = NULL;
@@ -1718,10 +1713,6 @@
 
 	memset(&fw, 0, sizeof(fw));
 
-	lib_dir = getenv("IP6TABLES_LIB_DIR");
-	if (!lib_dir)
-		lib_dir = IP6T_LIB_DIR;
-
 	/* re-set optind to 0 in case do_command gets called
 	 * a second time */
 	optind = 0;

Modified: trunk/iptables/iptables-restore.c
===================================================================
--- trunk/iptables/iptables-restore.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/iptables-restore.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -4,7 +4,7 @@
  *
  * This code is distributed under the terms of GNU GPL v2
  *
- * $Id: iptables-restore.c,v 1.35 2004/06/25 11:18:57 kadlec Exp $
+ * $Id$
  */
 
 #include <getopt.h>
@@ -119,6 +119,10 @@
 	program_version = IPTABLES_VERSION;
 	line = 0;
 
+	lib_dir = getenv("IPTABLES_LIB_DIR");
+	if (!lib_dir)
+		lib_dir = IPT_LIB_DIR;
+
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif

Modified: trunk/iptables/iptables-save.c
===================================================================
--- trunk/iptables/iptables-save.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/iptables-save.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -335,6 +335,10 @@
 	program_name = "iptables-save";
 	program_version = IPTABLES_VERSION;
 
+	lib_dir = getenv("IPTABLES_LIB_DIR");
+	if (!lib_dir)
+		lib_dir = IPT_LIB_DIR;
+
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif

Modified: trunk/iptables/iptables-standalone.c
===================================================================
--- trunk/iptables/iptables-standalone.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/iptables-standalone.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -52,6 +52,10 @@
 	program_name = "iptables";
 	program_version = IPTABLES_VERSION;
 
+	lib_dir = getenv("IPTABLES_LIB_DIR");
+	if (!lib_dir)
+		lib_dir = IPT_LIB_DIR;
+
 #ifdef NO_SHARED_LIBS
 	init_extensions();
 #endif

Modified: trunk/iptables/iptables.c
===================================================================
--- trunk/iptables/iptables.c	2004-12-24 00:21:24 UTC (rev 3503)
+++ trunk/iptables/iptables.c	2004-12-27 19:49:28 UTC (rev 3504)
@@ -47,10 +47,6 @@
 #define FALSE 0
 #endif
 
-#ifndef IPT_LIB_DIR
-#define IPT_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
 #ifndef PROC_SYS_MODPROBE
 #define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
 #endif
@@ -195,6 +191,7 @@
 
 const char *program_version;
 const char *program_name;
+char *lib_dir;
 
 /* Keeping track of external matches and targets: linked lists.  */
 struct iptables_match *iptables_matches = NULL;
@@ -210,8 +207,6 @@
 	u_int8_t num;
 };
 
-static char *lib_dir;
-
 /* Primitive headers... */
 /* defined in netinet/in.h */
 #if 0
@@ -1715,10 +1710,6 @@
 
 	memset(&fw, 0, sizeof(fw));
 
-	lib_dir = getenv("IPTABLES_LIB_DIR");
-	if (!lib_dir)
-		lib_dir = IPT_LIB_DIR;
-
 	/* re-set optind to 0 in case do_command gets called
 	 * a second time */
 	optind = 0;




More information about the netfilter-cvslog mailing list