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

kaber at netfilter.org kaber at netfilter.org
Thu Dec 22 04:33:51 CET 2005


Author: kaber at netfilter.org
Date: 2005-12-22 04:33:50 +0100 (Thu, 22 Dec 2005)
New Revision: 6336

Modified:
   trunk/iptables/include/ip6tables.h
   trunk/iptables/include/iptables.h
   trunk/iptables/ip6tables.c
   trunk/iptables/iptables.c
Log:
Fix probing for supported revisions (Jones Desougi <jones at ingate.com>)

Bugzilla #413


Modified: trunk/iptables/include/ip6tables.h
===================================================================
--- trunk/iptables/include/ip6tables.h	2005-12-21 09:02:49 UTC (rev 6335)
+++ trunk/iptables/include/ip6tables.h	2005-12-22 03:33:50 UTC (rev 6336)
@@ -130,6 +130,7 @@
 
 enum ip6t_tryload {
 	DONT_LOAD,
+	DURING_LOAD,
 	TRY_LOAD,
 	LOAD_MUST_SUCCEED
 };

Modified: trunk/iptables/include/iptables.h
===================================================================
--- trunk/iptables/include/iptables.h	2005-12-21 09:02:49 UTC (rev 6335)
+++ trunk/iptables/include/iptables.h	2005-12-22 03:33:50 UTC (rev 6336)
@@ -162,6 +162,7 @@
 
 enum ipt_tryload {
 	DONT_LOAD,
+	DURING_LOAD,
 	TRY_LOAD,
 	LOAD_MUST_SUCCEED
 };

Modified: trunk/iptables/ip6tables.c
===================================================================
--- trunk/iptables/ip6tables.c	2005-12-21 09:02:49 UTC (rev 6335)
+++ trunk/iptables/ip6tables.c	2005-12-22 03:33:50 UTC (rev 6336)
@@ -734,7 +734,7 @@
   	}
 
 #ifndef NO_SHARED_LIBS
-	if (!ptr && tryload != DONT_LOAD) {
+	if (!ptr && tryload != DONT_LOAD && tryload != DURING_LOAD) {
 		char path[strlen(lib_dir) + sizeof("/libip6t_.so")
 			 + strlen(name)];
 		if (!icmphack)
@@ -986,7 +986,7 @@
 	}
 
 #ifndef NO_SHARED_LIBS
-	if (!ptr && tryload != DONT_LOAD) {
+	if (!ptr && tryload != DONT_LOAD && tryload != DURING_LOAD) {
 		char path[strlen(lib_dir) + sizeof("/libip6t_.so")
 			 + strlen(name)];
 		sprintf(path, "%s/libip6t_%s.so", lib_dir, name);
@@ -1058,7 +1058,7 @@
 		exit(1);
 	}
 
-	if (find_match(me->name, DONT_LOAD, NULL)) {
+	if (find_match(me->name, DURING_LOAD, NULL)) {
 		fprintf(stderr, "%s: match `%s' already registered.\n",
 			program_name, me->name);
 		exit(1);
@@ -1088,7 +1088,7 @@
 		exit(1);
 	}
 
-	if (find_target(me->name, DONT_LOAD)) {
+	if (find_target(me->name, DURING_LOAD)) {
 		fprintf(stderr, "%s: target `%s' already registered.\n",
 			program_name, me->name);
 		exit(1);

Modified: trunk/iptables/iptables.c
===================================================================
--- trunk/iptables/iptables.c	2005-12-21 09:02:49 UTC (rev 6335)
+++ trunk/iptables/iptables.c	2005-12-22 03:33:50 UTC (rev 6336)
@@ -685,7 +685,7 @@
 	}
 
 #ifndef NO_SHARED_LIBS
-	if (!ptr && tryload != DONT_LOAD) {
+	if (!ptr && tryload != DONT_LOAD && tryload != DURING_LOAD) {
 		char path[strlen(lib_dir) + sizeof("/libipt_.so")
 			 + strlen(name)];
 		sprintf(path, "%s/libipt_%s.so", lib_dir, name);
@@ -994,7 +994,7 @@
 	}
 
 #ifndef NO_SHARED_LIBS
-	if (!ptr && tryload != DONT_LOAD) {
+	if (!ptr && tryload != DONT_LOAD && tryload != DURING_LOAD) {
 		char path[strlen(lib_dir) + sizeof("/libipt_.so")
 			 + strlen(name)];
 		sprintf(path, "%s/libipt_%s.so", lib_dir, name);
@@ -1119,7 +1119,7 @@
 		exit(1);
 	}
 
-	old = find_match(me->name, DONT_LOAD, NULL);
+	old = find_match(me->name, DURING_LOAD, NULL);
 	if (old) {
 		if (old->revision == me->revision) {
 			fprintf(stderr,
@@ -1175,7 +1175,7 @@
 		exit(1);
 	}
 
-	old = find_target(me->name, DONT_LOAD);
+	old = find_target(me->name, DURING_LOAD);
 	if (old) {
 		struct iptables_target **i;
 




More information about the netfilter-cvslog mailing list