source: clfs-embedded/patches/iptables-1.3.7-do_multi-1.patch@ 82b88f2

Last change on this file since 82b88f2 was 3c65c99, checked in by Jim Gifford <clfs@…>, 18 years ago

Updates to Iptables, Typos, and Validation error fixes

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[3c65c99]1Submitted By: Jim Gifford <jciccone@linuxfromscratch.org>
2Date: 2007-02-04
3Initial Package Version: 1.3.7
4Origin: http://lists.netfilter.org/pipermail/netfilter-devel/2006-December/026344.html
5Upstream Status: Already Applied
6Description: Fixes Build Issues with DO_MULTI=1
7
8diff -Naur iptables-1.3.7.orig/iptables-multi.c iptables-1.3.7/iptables-multi.c
9--- iptables-1.3.7.orig/iptables-multi.c 2006-12-04 03:15:20.000000000 -0800
10+++ iptables-1.3.7/iptables-multi.c 2007-02-04 20:57:32.000000000 -0800
11@@ -6,6 +6,7 @@
12 int iptables_main(int argc, char **argv);
13 int iptables_save_main(int argc, char **argv);
14 int iptables_restore_main(int argc, char **argv);
15+int iptables_xml_main(int argc, char **argv);
16
17 int main(int argc, char **argv) {
18 char *progname;
19@@ -24,6 +25,8 @@
20
21 if (!strcmp(progname, "iptables-restore"))
22 return iptables_restore_main(argc, argv);
23+ if (!strcmp(progname, "iptables-xml"))
24+ return iptables_restore_main(argc, argv);
25
26 fprintf(stderr, "iptables multi-purpose version: unknown applet name %s\n", progname);
27 exit(1);
28diff -Naur iptables-1.3.7.orig/iptables-xml.c iptables-1.3.7/iptables-xml.c
29--- iptables-1.3.7.orig/iptables-xml.c 2006-12-04 03:15:20.000000000 -0800
30+++ iptables-1.3.7/iptables-xml.c 2007-02-04 20:57:32.000000000 -0800
31@@ -26,8 +26,9 @@
32 /* no need to link with iptables.o */
33 const char *program_name;
34 const char *program_version;
35-int line = 0;
36
37+#ifndef IPTABLES_MULTI
38+int line = 0;
39 void
40 exit_error(enum exittype status, char *msg, ...)
41 {
42@@ -41,6 +42,7 @@
43 /* On error paths, make sure that we don't leak memory */
44 exit(status);
45 }
46+#endif
47
48 static void print_usage(const char *name, const char *version)
49 __attribute__ ((noreturn));
50@@ -66,7 +68,7 @@
51 exit(1);
52 }
53
54-int
55+static int
56 parse_counters(char *string, struct ipt_counters *ctr)
57 {
58 if (string != NULL)
59@@ -605,7 +607,7 @@
60
61 #ifdef IPTABLES_MULTI
62 int
63-iptables_restore_main(int argc, char *argv[])
64+iptables_xml_main(int argc, char *argv[])
65 #else
66 int
67 main(int argc, char *argv[])
Note: See TracBrowser for help on using the repository browser.