netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds
@ 2011-06-07  1:27 Maciej Żenczykowski
  2011-06-07  1:28 ` Maciej Żenczykowski
  2011-06-07  9:12 ` Jan Engelhardt
  0 siblings, 2 replies; 7+ messages in thread
From: Maciej Żenczykowski @ 2011-06-07  1:27 UTC (permalink / raw)
  To: Maciej Żenczykowski; +Cc: netfilter-devel, Maciej Żenczykowski

From: Maciej Żenczykowski <maze@google.com>

Commit de791ff2d7ac85fa0a707bbd6d98457bb18c5cbb didn't actually
build the iptables-xml code into the xtables-multi binary...

Change-Id: Ib2701ae27ef10c2ce23b13b97b2abb52b520cd95
Signed-off-by: Maciej Zenczykowski <maze@google.com>
---
 Makefile.am      |    4 ++--
 iptables-multi.h |    1 -
 iptables-xml.c   |    4 ++--
 xtables-multi.c  |    6 ++++--
 xtables-multi.h  |    6 ++++++
 5 files changed, 14 insertions(+), 7 deletions(-)
 create mode 100644 xtables-multi.h

diff --git a/Makefile.am b/Makefile.am
index 60ea83b..48f01d8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/iptables-multi.h b/iptables-multi.h
index a9912b0..a2bb878 100644
--- a/iptables-multi.h
+++ b/iptables-multi.h
@@ -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 */
diff --git a/iptables-xml.c b/iptables-xml.c
index aa98f75..5aa638c 100644
--- a/iptables-xml.c
+++ b/iptables-xml.c
@@ -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
diff --git a/xtables-multi.c b/xtables-multi.c
index f8d56ce..8014d5f 100644
--- a/xtables-multi.c
+++ b/xtables-multi.c
@@ -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
index 0000000..615724b
--- /dev/null
+++ b/xtables-multi.h
@@ -0,0 +1,6 @@
+#ifndef _XTABLES_MULTI_H
+#define _XTABLES_MULTI_H 1
+
+extern int iptables_xml_main(int, char **);
+
+#endif /* _XTABLES_MULTI_H */
-- 
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds
  2011-06-07  1:27 [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds Maciej Żenczykowski
@ 2011-06-07  1:28 ` Maciej Żenczykowski
  2011-06-07  9:12 ` Jan Engelhardt
  1 sibling, 0 replies; 7+ messages in thread
From: Maciej Żenczykowski @ 2011-06-07  1:28 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

FYI, forgot to CC you.

2011/6/6 Maciej Żenczykowski <zenczykowski@gmail.com>:
> From: Maciej Żenczykowski <maze@google.com>
>
> Commit de791ff2d7ac85fa0a707bbd6d98457bb18c5cbb didn't actually
> build the iptables-xml code into the xtables-multi binary...
>
> Change-Id: Ib2701ae27ef10c2ce23b13b97b2abb52b520cd95
> Signed-off-by: Maciej Zenczykowski <maze@google.com>
> ---
>  Makefile.am      |    4 ++--
>  iptables-multi.h |    1 -
>  iptables-xml.c   |    4 ++--
>  xtables-multi.c  |    6 ++++--
>  xtables-multi.h  |    6 ++++++
>  5 files changed, 14 insertions(+), 7 deletions(-)
>  create mode 100644 xtables-multi.h
>
> diff --git a/Makefile.am b/Makefile.am
> index 60ea83b..48f01d8 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -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
> diff --git a/iptables-multi.h b/iptables-multi.h
> index a9912b0..a2bb878 100644
> --- a/iptables-multi.h
> +++ b/iptables-multi.h
> @@ -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 */
> diff --git a/iptables-xml.c b/iptables-xml.c
> index aa98f75..5aa638c 100644
> --- a/iptables-xml.c
> +++ b/iptables-xml.c
> @@ -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
> diff --git a/xtables-multi.c b/xtables-multi.c
> index f8d56ce..8014d5f 100644
> --- a/xtables-multi.c
> +++ b/xtables-multi.c
> @@ -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
> index 0000000..615724b
> --- /dev/null
> +++ b/xtables-multi.h
> @@ -0,0 +1,6 @@
> +#ifndef _XTABLES_MULTI_H
> +#define _XTABLES_MULTI_H 1
> +
> +extern int iptables_xml_main(int, char **);
> +
> +#endif /* _XTABLES_MULTI_H */
> --
> 1.7.3.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds
  2011-06-07  1:27 [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds Maciej Żenczykowski
  2011-06-07  1:28 ` Maciej Żenczykowski
@ 2011-06-07  9:12 ` Jan Engelhardt
  2011-06-07  9:29   ` Jan Engelhardt
  2011-06-07 18:04   ` Maciej Żenczykowski
  1 sibling, 2 replies; 7+ messages in thread
From: Jan Engelhardt @ 2011-06-07  9:12 UTC (permalink / raw)
  To: Maciej Żenczykowski; +Cc: Maciej Żenczykowski, netfilter-devel

On Tuesday 2011-06-07 03:27, Maciej Żenczykowski wrote:

>index 0000000..615724b
>--- /dev/null
>+++ b/xtables-multi.h
>@@ -0,0 +1,6 @@
>+#ifndef _XTABLES_MULTI_H
>+#define _XTABLES_MULTI_H 1
>+
>+extern int iptables_xml_main(int, char **);
>+
>+#endif /* _XTABLES_MULTI_H */
 
Simply put this in xshared.h.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds
  2011-06-07  9:12 ` Jan Engelhardt
@ 2011-06-07  9:29   ` Jan Engelhardt
  2011-06-07 18:04   ` Maciej Żenczykowski
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2011-06-07  9:29 UTC (permalink / raw)
  To: Maciej Żenczykowski; +Cc: Maciej Żenczykowski, netfilter-devel

On Tuesday 2011-06-07 11:12, Jan Engelhardt wrote:

>On Tuesday 2011-06-07 03:27, Maciej Żenczykowski wrote:
>
>>index 0000000..615724b
>>--- /dev/null
>>+++ b/xtables-multi.h
>>@@ -0,0 +1,6 @@
>>+#ifndef _XTABLES_MULTI_H
>>+#define _XTABLES_MULTI_H 1
>>+
>>+extern int iptables_xml_main(int, char **);
>>+
>>+#endif /* _XTABLES_MULTI_H */
> 
>Simply put this in xshared.h.

Applied anyway, cleanup follows later.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds
  2011-06-07  9:12 ` Jan Engelhardt
  2011-06-07  9:29   ` Jan Engelhardt
@ 2011-06-07 18:04   ` Maciej Żenczykowski
  2011-06-07 19:56     ` Jan Engelhardt
  1 sibling, 1 reply; 7+ messages in thread
From: Maciej Żenczykowski @ 2011-06-07 18:04 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

2011/6/7 Jan Engelhardt <jengelh@medozas.de>:
> Simply put this in xshared.h.

Theoretically this is only needed for compilation of xtables-multi,
and thus doesn't quite strictly belong in xshared.h.

I was also thinking of renaming the files iptables-xml.* to
xtables-xml.* to make it better reflect that it isn't ip4tables
specific
(a binary symlink would continue to exist).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds
  2011-06-07 18:04   ` Maciej Żenczykowski
@ 2011-06-07 19:56     ` Jan Engelhardt
  2011-06-07 20:36       ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2011-06-07 19:56 UTC (permalink / raw)
  To: Maciej Żenczykowski; +Cc: netfilter-devel

On Tuesday 2011-06-07 20:04, Maciej Żenczykowski wrote:

>2011/6/7 Jan Engelhardt <jengelh@medozas.de>:
>> Simply put this in xshared.h.
>
>Theoretically this is only needed for compilation of xtables-multi,
>and thus doesn't quite strictly belong in xshared.h.
>
>I was also thinking of renaming the files iptables-xml.* to
>xtables-xml.* to make it better reflect that it isn't ip4tables
>specific
>(a binary symlink would continue to exist).

Let me take care of that, I plan to move this into a separate dir 
already.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds
  2011-06-07 19:56     ` Jan Engelhardt
@ 2011-06-07 20:36       ` Jan Engelhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2011-06-07 20:36 UTC (permalink / raw)
  To: Maciej Żenczykowski; +Cc: netfilter-devel

On Tuesday 2011-06-07 21:56, Jan Engelhardt wrote:

>On Tuesday 2011-06-07 20:04, Maciej Żenczykowski wrote:
>
>>2011/6/7 Jan Engelhardt <jengelh@medozas.de>:
>>> Simply put this in xshared.h.
>>
>>Theoretically this is only needed for compilation of xtables-multi,
>>and thus doesn't quite strictly belong in xshared.h.
>>
>>I was also thinking of renaming the files iptables-xml.* to
>>xtables-xml.* to make it better reflect that it isn't ip4tables
>>specific
>>(a binary symlink would continue to exist).
>
>Let me take care of that, I plan to move this into a separate dir 
>already.

Hm... generally your idea is not bad, though iptables-xml would need to 
be kept as a v4_link (Makefile.am) I suspect.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-07 20:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07  1:27 [PATCH] xtables-multi: fix absence of xml translator in IPv6-only builds Maciej Żenczykowski
2011-06-07  1:28 ` Maciej Żenczykowski
2011-06-07  9:12 ` Jan Engelhardt
2011-06-07  9:29   ` Jan Engelhardt
2011-06-07 18:04   ` Maciej Żenczykowski
2011-06-07 19:56     ` Jan Engelhardt
2011-06-07 20:36       ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).