]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables-multi: fix absence of xml translator in IPv6-only builds
authorMaciej Żenczykowski <zenczykowski@gmail.com>
Tue, 7 Jun 2011 01:27:09 +0000 (18:27 -0700)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 7 Jun 2011 09:29:01 +0000 (11:29 +0200)
Commit v1.4.11-4-gde791ff did not actually build the iptables-xml code
into the xtables-multi binary.

Signed-off-by: Maciej Zenczykowski <maze@google.com>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Makefile.am
iptables-multi.h
iptables-xml.c
xtables-multi.c
xtables-multi.h [new file with mode: 0644]

index 60ea83b1ea5af416373197c3c884b704ddd9faa3..48f01d810b84c5c086ed672bc4f6e2b8e104e4a1 100644 (file)
@@ -38,7 +38,7 @@ libxtables_la_CFLAGS  = ${AM_CFLAGS} -DNO_SHARED_LIBS=1
 libxtables_la_LIBADD  =
 endif
 
-xtables_multi_SOURCES  = xtables-multi.c
+xtables_multi_SOURCES  = xtables-multi.c iptables-xml.c
 xtables_multi_CFLAGS   = ${AM_CFLAGS} -DIPTABLES_MULTI
 xtables_multi_LDFLAGS  = -rdynamic
 xtables_multi_LDADD    = extensions/libext.a
@@ -46,7 +46,7 @@ if ENABLE_STATIC
 xtables_multi_CFLAGS  += -DALL_INCLUSIVE
 endif
 if ENABLE_IPV4
-xtables_multi_SOURCES += iptables-save.c iptables-restore.c iptables-xml.c \
+xtables_multi_SOURCES += iptables-save.c iptables-restore.c \
                          iptables-standalone.c iptables.c
 xtables_multi_CFLAGS  += -DENABLE_IPV4
 xtables_multi_LDADD   += libiptc/libip4tc.la extensions/libext4.a
index a9912b0479993cfe30f9de3c709222c3802739d7..a2bb8784d9db8d0276f03b69d1c95513679433dd 100644 (file)
@@ -4,6 +4,5 @@
 extern int iptables_main(int, char **);
 extern int iptables_save_main(int, char **);
 extern int iptables_restore_main(int, char **);
-extern int iptables_xml_main(int, char **);
 
 #endif /* _IPTABLES_MULTI_H */
index aa98f75e21acaa4e4629f7d7d86eacaa02f6a1f7..5aa638c01ec13a9e7303750ea9eecf8861dd3ff5 100644 (file)
@@ -1,6 +1,6 @@
 /* Code to convert iptables-save format to xml format,
  * (C) 2006 Ufo Mechanic <azez@ufomechanic.net>
- * based on iptables-restor (C) 2000-2002 by Harald Welte <laforge@gnumonks.org>
+ * based on iptables-restore (C) 2000-2002 by Harald Welte <laforge@gnumonks.org>
  * based on previous code from Rusty Russell <rusty@linuxcare.com.au>
  *
  * This code is distributed under the terms of GNU GPL v2
@@ -14,7 +14,7 @@
 #include <stdarg.h>
 #include "iptables.h"
 #include "libiptc/libiptc.h"
-#include "iptables-multi.h"
+#include "xtables-multi.h"
 #include <xtables.h>
 
 #ifdef DEBUG
index f8d56ce94db343ba167ef6478caa402061e9ab6f..8014d5fb7043d156bf641d6adb5b7cd42fb1c82f 100644 (file)
@@ -3,6 +3,8 @@
 #include <string.h>
 #include "xshared.h"
 
+#include "xtables-multi.h"
+
 #ifdef ENABLE_IPV4
 #include "iptables-multi.h"
 #endif
@@ -19,9 +21,9 @@ static const struct subcommand multi_subcommands[] = {
        {"save4",               iptables_save_main},
        {"iptables-restore",    iptables_restore_main},
        {"restore4",            iptables_restore_main},
-       {"iptables-xml",        iptables_xml_main},
-       {"xml4",                iptables_xml_main},
 #endif
+       {"iptables-xml",        iptables_xml_main},
+       {"xml",                 iptables_xml_main},
 #ifdef ENABLE_IPV6
        {"ip6tables",           ip6tables_main},
        {"main6",               ip6tables_main},
diff --git a/xtables-multi.h b/xtables-multi.h
new file mode 100644 (file)
index 0000000..615724b
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _XTABLES_MULTI_H
+#define _XTABLES_MULTI_H 1
+
+extern int iptables_xml_main(int, char **);
+
+#endif /* _XTABLES_MULTI_H */