SOURCES: iptables-batch.patch - updated for 1.4.3

zbyniu zbyniu at pld-linux.org
Thu Mar 26 14:11:18 CET 2009


Author: zbyniu                       Date: Thu Mar 26 13:11:18 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated for 1.4.3

---- Files affected:
SOURCES:
   iptables-batch.patch (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/iptables-batch.patch
diff -u SOURCES/iptables-batch.patch:1.4 SOURCES/iptables-batch.patch:1.5
--- SOURCES/iptables-batch.patch:1.4	Wed Mar 25 10:50:25 2009
+++ SOURCES/iptables-batch.patch	Thu Mar 26 14:11:12 2009
@@ -24,7 +24,7 @@
 diff -urN iptables-1.4.1.1.orig/iptables-batch.c iptables-1.4.1.1/iptables-batch.c
 --- iptables-1.4.1.1.orig/iptables-batch.c	1970-01-01 01:00:00.000000000 +0100
 +++ iptables-1.4.1.1/iptables-batch.c	2008-08-24 10:42:00.000000000 +0200
-@@ -0,0 +1,471 @@
+@@ -0,0 +1,474 @@
 +/*
 + * Author: Ludwig Nussel <ludwig.nussel at suse.de>
 + *
@@ -207,9 +207,9 @@
 +{
 +	char* name;
 +#ifdef BATCH_IPV6
-+	ip6tc_handle *handle;
++	struct ip6tc_handle *handle;
 +#else
-+	iptc_handle *handle;
++	struct iptc_handle *handle;
 +#endif
 +};
 +
@@ -217,6 +217,9 @@
 +static unsigned num_tables;
 +struct table_handle* current_table;
 +
++/* Search path for Xtables .so files */
++static const char *xtables_libdir;
++
 +static void
 +alloc_tables()
 +{
@@ -331,13 +334,13 @@
 +		if(tables[i].handle)
 +		{
 +#ifdef BATCH_IPV6
-+			if(!ip6tc_commit(&tables[i].handle))
++			if(!ip6tc_commit(tables[i].handle))
 +			{
 +				fprintf(stderr, "commit failed on table %s: %s\n", tables[i].name, ip6tc_strerror(errno));
 +				ret = 0;
 +			}
 +#else
-+			if(!iptc_commit(&tables[i].handle))
++			if(!iptc_commit(tables[i].handle))
 +			{
 +				fprintf(stderr, "commit failed on table %s: %s\n", tables[i].name, iptc_strerror(errno));
 +				ret = 0;
@@ -352,7 +355,7 @@
 +static void
 +help()
 +{
-+	fprintf(stderr, "Usage: %s [FILE]\n\n", program_name);
++	fprintf(stderr, "Usage: %s [FILE]\n\n", xt_params->program_name);
 +	puts("Read iptables commands from FILE, commit them at EOF\n");
 +	puts("In addition to normal iptables calls the commands");
 +	puts("'commit' and 'exit' are understood.");
@@ -380,26 +383,26 @@
 +	FILE* fp = stdin;
 +
 +#ifdef BATCH_IPV6
-+	program_name = "ip6tables-batch";
++	//program_name = "ip6tables-batch";
 +
-+	lib_dir = getenv("XTABLES_LIBDIR");
-+	if (!lib_dir) {
-+		lib_dir = getenv("IP6TABLES_LIB_DIR");
-+		if (!lib_dir)
-+			lib_dir = XTABLES_LIBDIR;
++	xtables_libdir = getenv("XTABLES_LIBDIR");
++	if (!xtables_libdir) {
++		xtables_libdir = getenv("IP6TABLES_LIB_DIR");
++		if (!xtables_libdir)
++			xtables_libdir = XTABLES_LIBDIR;
 +	}
 +#else
-+	program_name = "iptables-batch";
++	//program_name = "iptables-batch";
 +
-+	lib_dir = getenv("XTABLES_LIBDIR");
-+	if (!lib_dir) {
-+		lib_dir = getenv("IPTABLES_LIB_DIR");
-+		if (!lib_dir)
-+			lib_dir = XTABLES_LIBDIR;
++	xtables_libdir = getenv("XTABLES_LIBDIR");
++	if (!xtables_libdir) {
++		xtables_libdir = getenv("IPTABLES_LIB_DIR");
++		if (!xtables_libdir)
++			xtables_libdir = XTABLES_LIBDIR;
 +	}
 +
 +#endif
-+	program_version = XTABLES_VERSION;
++	//program_version = XTABLES_VERSION;
 +
 +#ifdef NO_SHARED_LIBS
 +	init_extensions();
@@ -546,7 +549,7 @@
  iptables_static_SOURCES   = ${iptables_multi_SOURCES} xtables.c
 -iptables_static_CFLAGS    = ${iptables_multi_CFLAGS} -DNO_SHARED_LIBS=1
 +iptables_static_CFLAGS    = ${iptables_multi_CFLAGS} -DNO_SHARED_LIBS=1 -DBATCH_IPV4
- iptables_static_LDADD     = -lm libiptc/libiptc.la extensions/libext4.a
+ iptables_static_LDADD     = libiptc/libiptc.la extensions/libext4.a -lm
  
  iptables_xml_SOURCES      = iptables-xml.c
 @@ -58,8 +63,8 @@
@@ -573,7 +576,7 @@
  ip6tables_static_SOURCES    = ${ip6tables_multi_SOURCES} xtables.c
 -ip6tables_static_CFLAGS     = ${ip6tables_multi_CFLAGS} -DNO_SHARED_LIBS=1
 +ip6tables_static_CFLAGS     = ${ip6tables_multi_CFLAGS} -DNO_SHARED_LIBS=1 -DBATCH_IPV6
- ip6tables_static_LDADD      = -lm libiptc/libiptc.la extensions/libext6.a
+ ip6tables_static_LDADD      = libiptc/libiptc.la extensions/libext6.a -lm
  
  bin_PROGRAMS     = iptables-xml
 @@ -89,7 +99,8 @@
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/iptables-batch.patch?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list