[netfilter-cvslog] r7085 - trunk/iptables
kaber at trash.net
kaber at trash.net
Wed Oct 31 12:48:04 CET 2007
Author: kaber at trash.net
Date: 2007-10-31 12:48:04 +0100 (Wed, 31 Oct 2007)
New Revision: 7085
Added:
trunk/iptables/ip6tables-multi.c
Log:
[PATCH] let DO_MULTI=1 work for ip6tables* binaries part 2
Sorry forgot to mention that the "ip6tables-multi.c" (in the patch) which is
not in the repository has to be manually added.
Hann-huei Chiou <koala at ascenvision.com>
Added: trunk/iptables/ip6tables-multi.c
===================================================================
--- trunk/iptables/ip6tables-multi.c (rev 0)
+++ trunk/iptables/ip6tables-multi.c 2007-10-31 11:48:04 UTC (rev 7085)
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <libgen.h>
+
+int ip6tables_main(int argc, char **argv);
+int ip6tables_save_main(int argc, char **argv);
+int ip6tables_restore_main(int argc, char **argv);
+
+int main(int argc, char **argv) {
+ char *progname;
+
+ if (argc == 0) {
+ fprintf(stderr, "no argv[0]?");
+ exit(1);
+ } else {
+ progname = basename(argv[0]);
+
+ if (!strcmp(progname, "ip6tables"))
+ return ip6tables_main(argc, argv);
+
+ if (!strcmp(progname, "ip6tables-save"))
+ return ip6tables_save_main(argc, argv);
+
+ if (!strcmp(progname, "ip6tables-restore"))
+ return ip6tables_restore_main(argc, argv);
+
+ fprintf(stderr, "ip6tables multi-purpose version: unknown applet name %s\n", progname);
+ exit(1);
+ }
+}
More information about the netfilter-cvslog
mailing list