1 Index: iptables-1.4.18/iptables/ip6tables-restore.c
2 ===================================================================
3 --- iptables-1.4.18.orig/iptables/ip6tables-restore.c 2013-03-05 16:37:31.000000000 +0100
4 +++ iptables-1.4.18/iptables/ip6tables-restore.c 2013-03-05 16:42:57.475249794 +0100
11 #include "ip6tables.h"
13 #include "libiptc/libip6tc.h"
15 #define DEBUGP(x, args...)
19 static int binary = 0, counters = 0, verbose = 0, noflush = 0;
21 /* Keeping track of external matches and targets. */
23 {.name = "test", .has_arg = false, .val = 't'},
24 {.name = "help", .has_arg = false, .val = 'h'},
25 {.name = "noflush", .has_arg = false, .val = 'n'},
26 + {.name = "lenient", .has_arg = false, .val = 'l'},
27 {.name = "modprobe", .has_arg = true, .val = 'M'},
28 {.name = "table", .has_arg = true, .val = 'T'},
35 " [ --modprobe=<command>]\n", name);
42 +static void catch_exit_error(enum xtables_exittype status, const char *msg, ...)
45 + fprintf(stderr, "line %d: ", line);
46 + va_start(args, msg);
47 + vfprintf(stderr, msg, args);
49 + fprintf(stderr, "\n");
50 + longjmp(jmp, status);
53 static void add_param_to_argv(char *parsestart)
55 int quote_open = 0, escaped = 0, param_len = 0;
60 - while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
61 + while ((c = getopt_long(argc, argv, "bcvthnlM:T:", options, NULL)) != -1) {
70 + ip6tables_globals.exit_err = catch_exit_error;
73 xtables_modprobe_program = optarg;
76 for (a = 0; a < newargc; a++)
77 DEBUGP("argv[%u]: %s\n", a, newargv[a]);
79 - ret = do_command6(newargc, newargv,
80 - &newargv[2], &handle);
82 + ret = do_command6(newargc, newargv,
83 + &newargv[2], &handle);
89 Index: iptables-1.4.18/iptables/iptables-restore.c
90 ===================================================================
91 --- iptables-1.4.18.orig/iptables/iptables-restore.c 2013-03-05 16:37:31.000000000 +0100
92 +++ iptables-1.4.18/iptables/iptables-restore.c 2013-03-05 16:44:56.303247355 +0100
101 #include "libiptc/libiptc.h"
103 #define DEBUGP(x, args...)
107 static int binary = 0, counters = 0, verbose = 0, noflush = 0;
109 /* Keeping track of external matches and targets. */
111 {.name = "test", .has_arg = false, .val = 't'},
112 {.name = "help", .has_arg = false, .val = 'h'},
113 {.name = "noflush", .has_arg = false, .val = 'n'},
114 + {.name = "lenient", .has_arg = false, .val = 'l'},
115 {.name = "modprobe", .has_arg = true, .val = 'M'},
116 {.name = "table", .has_arg = true, .val = 'T'},
123 " [ --table=<TABLE> ]\n"
124 " [ --modprobe=<command>]\n", name);
130 +static void catch_exit_error(enum xtables_exittype status, const char *msg, ...)
133 + fprintf(stderr, "line %d: ", line);
134 + va_start(args, msg);
135 + vfprintf(stderr, msg, args);
137 + fprintf(stderr, "\n");
138 + longjmp(jmp, status);
141 static void add_param_to_argv(char *parsestart)
143 int quote_open = 0, escaped = 0, param_len = 0;
148 - while ((c = getopt_long(argc, argv, "bcvthnM:T:", options, NULL)) != -1) {
149 + while ((c = getopt_long(argc, argv, "bcvthnlM:T:", options, NULL)) != -1) {
158 + iptables_globals.exit_err = catch_exit_error;
161 xtables_modprobe_program = optarg;
164 for (a = 0; a < newargc; a++)
165 DEBUGP("argv[%u]: %s\n", a, newargv[a]);
167 - ret = do_command4(newargc, newargv,
168 - &newargv[2], &handle);
170 + ret = do_command4(newargc, newargv,
171 + &newargv[2], &handle);