source: clfs-embedded/patches/iptables-1.3.7-do_multi-1.patch@ 943c29a

Last change on this file since 943c29a was 751a25a, checked in by Jim Gifford <clfs@…>, 18 years ago

Fixed IPTables DO_MULTI Patch

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[3c65c99]1Submitted By: Jim Gifford <jciccone@linuxfromscratch.org>
[751a25a]2Date: 2007-02-05
[3c65c99]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
[751a25a]8diff -Naur iptables-1.3.7.orig/Makefile iptables-1.3.7/Makefile
9--- iptables-1.3.7.orig/Makefile 2006-12-04 03:16:01.000000000 -0800
10+++ iptables-1.3.7/Makefile 2007-02-05 10:57:33.000000000 -0800
11@@ -170,7 +170,7 @@
12 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
13
14 ifeq ($(DO_MULTI), 1)
15-$(DESTDIR)$(BINDIR)/iptables-xml: iptables-xml
16+$(DESTDIR)$(BINDIR)/iptables-xml: iptables
17 @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
18 ln -sf $< $@
19 else
[3c65c99]20diff -Naur iptables-1.3.7.orig/iptables-multi.c iptables-1.3.7/iptables-multi.c
21--- iptables-1.3.7.orig/iptables-multi.c 2006-12-04 03:15:20.000000000 -0800
[751a25a]22+++ iptables-1.3.7/iptables-multi.c 2007-02-05 10:55:22.000000000 -0800
[3c65c99]23@@ -6,6 +6,7 @@
24 int iptables_main(int argc, char **argv);
25 int iptables_save_main(int argc, char **argv);
26 int iptables_restore_main(int argc, char **argv);
27+int iptables_xml_main(int argc, char **argv);
28
29 int main(int argc, char **argv) {
30 char *progname;
31@@ -24,6 +25,8 @@
32
33 if (!strcmp(progname, "iptables-restore"))
34 return iptables_restore_main(argc, argv);
35+ if (!strcmp(progname, "iptables-xml"))
36+ return iptables_restore_main(argc, argv);
37
38 fprintf(stderr, "iptables multi-purpose version: unknown applet name %s\n", progname);
39 exit(1);
40diff -Naur iptables-1.3.7.orig/iptables-xml.c iptables-1.3.7/iptables-xml.c
41--- iptables-1.3.7.orig/iptables-xml.c 2006-12-04 03:15:20.000000000 -0800
[751a25a]42+++ iptables-1.3.7/iptables-xml.c 2007-02-05 10:55:22.000000000 -0800
[3c65c99]43@@ -26,8 +26,9 @@
44 /* no need to link with iptables.o */
45 const char *program_name;
46 const char *program_version;
47-int line = 0;
48
49+#ifndef IPTABLES_MULTI
50+int line = 0;
51 void
52 exit_error(enum exittype status, char *msg, ...)
53 {
54@@ -41,6 +42,7 @@
55 /* On error paths, make sure that we don't leak memory */
56 exit(status);
57 }
58+#endif
59
60 static void print_usage(const char *name, const char *version)
61 __attribute__ ((noreturn));
62@@ -66,7 +68,7 @@
63 exit(1);
64 }
65
66-int
67+static int
68 parse_counters(char *string, struct ipt_counters *ctr)
69 {
70 if (string != NULL)
71@@ -605,7 +607,7 @@
72
73 #ifdef IPTABLES_MULTI
74 int
75-iptables_restore_main(int argc, char *argv[])
76+iptables_xml_main(int argc, char *argv[])
77 #else
78 int
79 main(int argc, char *argv[])
Note: See TracBrowser for help on using the repository browser.