]> git.pld-linux.org Git - packages/iptables.git/commitdiff
- updated for 1.4.3
authorzbyniu <zbyniu@pld-linux.org>
Thu, 26 Mar 2009 13:11:12 +0000 (13:11 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    iptables-batch.patch -> 1.5

iptables-batch.patch

index e078002c2e134584dd3c91b350fe56ec4cad2bc7..bc24db8b9c8b03a9055a2901b493270b0ee3071d 100644 (file)
@@ -24,7 +24,7 @@ diff -urN iptables-1.4.1.1.orig/ip6tables-multi.h iptables-1.4.1.1/ip6tables-mul
 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@suse.de>
 + *
@@ -207,9 +207,9 @@ diff -urN iptables-1.4.1.1.orig/iptables-batch.c iptables-1.4.1.1/iptables-batch
 +{
 +      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 @@ diff -urN iptables-1.4.1.1.orig/iptables-batch.c iptables-1.4.1.1/iptables-batch
 +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 @@ diff -urN iptables-1.4.1.1.orig/iptables-batch.c iptables-1.4.1.1/iptables-batch
 +              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 @@ diff -urN iptables-1.4.1.1.orig/iptables-batch.c iptables-1.4.1.1/iptables-batch
 +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 @@ diff -urN iptables-1.4.1.1.orig/iptables-batch.c iptables-1.4.1.1/iptables-batch
 +      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 @@ diff -urN iptables-1.4.1.1.orig/Makefile.am iptables-1.4.1.1/Makefile.am
  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 @@ diff -urN iptables-1.4.1.1.orig/Makefile.am iptables-1.4.1.1/Makefile.am
  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 @@
This page took 0.091337 seconds and 4 git commands to generate.