* iptables-xml broken with IPTABLES_MULTI
@ 2006-12-07 12:38 Lutz Jaenicke
2006-12-07 12:49 ` Yasuyuki KOZAKAI
0 siblings, 1 reply; 3+ messages in thread
From: Lutz Jaenicke @ 2006-12-07 12:38 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 429 bytes --]
Hi!
as of iptables-1.3.7 a new "iptables-xml" command is added automatically
to the IPTABLES_MULTI executable. It however breaks during build.
The attached patch seems to fix it.
Best regards,
Lutz
--
Dr.-Ing. Lutz Jänicke
CTO
Innominate Security Technologies AG /protecting industrial networks/
tel: +49.30.6392-3308
fax: +49.30.6392-3307
Albert-Einstein-Str. 14
D-12489 Berlin, Germany
www.innominate.com
[-- Attachment #2: iptables-multi.diff --]
[-- Type: text/plain, Size: 3105 bytes --]
Index: ip6tables-restore.c
===================================================================
RCS file: /cvs/mguard/iptables/ip6tables-restore.c,v
retrieving revision 1.5
diff -u -r1.5 ip6tables-restore.c
--- ip6tables-restore.c 9 Oct 2006 08:21:24 -0000 1.5
+++ ip6tables-restore.c 7 Dec 2006 12:27:38 -0000
@@ -74,7 +74,7 @@
return handle;
}
-int parse_counters(char *string, struct ip6t_counters *ctr)
+static int parse_counters(char *string, struct ip6t_counters *ctr)
{
return (sscanf(string, "[%llu:%llu]", (unsigned long long *)&ctr->pcnt, (unsigned long long *)&ctr->bcnt) == 2);
}
Index: iptables-multi.c
===================================================================
RCS file: /cvs/mguard/iptables/iptables-multi.c,v
retrieving revision 1.5
diff -u -r1.5 iptables-multi.c
--- iptables-multi.c 18 Oct 2006 17:44:45 -0000 1.5
+++ iptables-multi.c 7 Dec 2006 12:27:38 -0000
@@ -12,6 +12,7 @@
int iptables_main(int argc, char **argv);
int iptables_save_main(int argc, char **argv);
int iptables_restore_main(int argc, char **argv);
+int iptables_xml_main(int argc, char **argv);
int innominate_log_api = 0;
@@ -72,6 +73,9 @@
if (!strcmp(progname, "iptables-restore"))
return iptables_restore_main(argc, argv);
+ if (!strcmp(progname, "iptables-xml"))
+ return iptables_xml_main(argc, argv);
+
fprintf(stderr, "iptables multi-purpose version: unknown applet name %s\n", progname);
exit(1);
}
Index: iptables-restore.c
===================================================================
RCS file: /cvs/mguard/iptables/iptables-restore.c,v
retrieving revision 1.5
diff -u -r1.5 iptables-restore.c
--- iptables-restore.c 9 Oct 2006 08:21:24 -0000 1.5
+++ iptables-restore.c 7 Dec 2006 12:27:38 -0000
@@ -71,7 +71,7 @@
return handle;
}
-int parse_counters(char *string, struct ipt_counters *ctr)
+static int parse_counters(char *string, struct ipt_counters *ctr)
{
return (sscanf(string, "[%llu:%llu]", (unsigned long long *)&ctr->pcnt, (unsigned long long *)&ctr->bcnt) == 2);
}
Index: iptables-xml.c
===================================================================
RCS file: /cvs/mguard/iptables/iptables-xml.c,v
retrieving revision 1.1
diff -u -r1.1 iptables-xml.c
--- iptables-xml.c 7 Dec 2006 12:08:48 -0000 1.1
+++ iptables-xml.c 7 Dec 2006 12:27:38 -0000
@@ -26,9 +26,9 @@
/* no need to link with iptables.o */
const char *program_name;
const char *program_version;
-int line = 0;
-void
+#ifndef IPTABLES_MULTI
+int line = 0;
exit_error(enum exittype status, char *msg, ...)
{
va_list args;
@@ -41,6 +41,7 @@
/* On error paths, make sure that we don't leak memory */
exit(status);
}
+#endif
static void print_usage(const char *name, const char *version)
__attribute__ ((noreturn));
@@ -66,7 +67,7 @@
exit(1);
}
-int
+static int
parse_counters(char *string, struct ipt_counters *ctr)
{
if (string != NULL)
@@ -605,7 +606,7 @@
#ifdef IPTABLES_MULTI
int
-iptables_restore_main(int argc, char *argv[])
+iptables_xml_main(int argc, char *argv[])
#else
int
main(int argc, char *argv[])
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: iptables-xml broken with IPTABLES_MULTI
2006-12-07 12:38 iptables-xml broken with IPTABLES_MULTI Lutz Jaenicke
@ 2006-12-07 12:49 ` Yasuyuki KOZAKAI
2006-12-11 4:00 ` Yasuyuki KOZAKAI
0 siblings, 1 reply; 3+ messages in thread
From: Yasuyuki KOZAKAI @ 2006-12-07 12:49 UTC (permalink / raw)
To: ljaenicke; +Cc: netfilter-devel
From: Lutz Jaenicke <ljaenicke@innominate.com>
Date: Thu, 7 Dec 2006 13:38:47 +0100
> Hi!
>
> as of iptables-1.3.7 a new "iptables-xml" command is added automatically
> to the IPTABLES_MULTI executable. It however breaks during build.
> The attached patch seems to fix it.
Wow same timing. Your patch is better than mine, then I'll apply it.
Thanks a lot.
-- Yasuyuki Kozakai
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: iptables-xml broken with IPTABLES_MULTI
2006-12-07 12:49 ` Yasuyuki KOZAKAI
@ 2006-12-11 4:00 ` Yasuyuki KOZAKAI
0 siblings, 0 replies; 3+ messages in thread
From: Yasuyuki KOZAKAI @ 2006-12-11 4:00 UTC (permalink / raw)
To: yasuyuki.kozakai; +Cc: netfilter-devel, ljaenicke
From: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
Date: Thu, 07 Dec 2006 21:49:02 +0900 (JST)
> From: Lutz Jaenicke <ljaenicke@innominate.com>
> Date: Thu, 7 Dec 2006 13:38:47 +0100
>
> > Hi!
> >
> > as of iptables-1.3.7 a new "iptables-xml" command is added automatically
> > to the IPTABLES_MULTI executable. It however breaks during build.
> > The attached patch seems to fix it.
>
> Wow same timing. Your patch is better than mine, then I'll apply it.
>
> Thanks a lot.
Applied. I've also added the deleted 'void' for exit_error and fixed
Makefile to create link iptables-xml to iptables.
-- Yasuyuki Kozakai
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-11 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07 12:38 iptables-xml broken with IPTABLES_MULTI Lutz Jaenicke
2006-12-07 12:49 ` Yasuyuki KOZAKAI
2006-12-11 4:00 ` Yasuyuki KOZAKAI
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.