struct xtables_target *t;
unsigned long long cnt;
bool table_set = false;
+ bool invert = false;
/* re-set optind to 0 in case do_command6 gets called
* a second time */
* Command selection
*/
case 'A':
- add_command(&command, CMD_APPEND, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_APPEND, CMD_NONE, invert);
chain = optarg;
break;
case 'C':
- add_command(&command, CMD_CHECK, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_CHECK, CMD_NONE, invert);
chain = optarg;
break;
case 'D':
- add_command(&command, CMD_DELETE, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_DELETE, CMD_NONE, invert);
chain = optarg;
if (xs_has_arg(argc, argv)) {
rulenum = parse_rulenumber(argv[optind++]);
break;
case 'R':
- add_command(&command, CMD_REPLACE, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_REPLACE, CMD_NONE, invert);
chain = optarg;
if (xs_has_arg(argc, argv))
rulenum = parse_rulenumber(argv[optind++]);
break;
case 'I':
- add_command(&command, CMD_INSERT, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_INSERT, CMD_NONE, invert);
chain = optarg;
if (xs_has_arg(argc, argv))
rulenum = parse_rulenumber(argv[optind++]);
case 'L':
add_command(&command, CMD_LIST,
- CMD_ZERO | CMD_ZERO_NUM, cs.invert);
+ CMD_ZERO | CMD_ZERO_NUM, invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'S':
add_command(&command, CMD_LIST_RULES,
- CMD_ZERO | CMD_ZERO_NUM, cs.invert);
+ CMD_ZERO | CMD_ZERO_NUM, invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
break;
case 'F':
- add_command(&command, CMD_FLUSH, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_FLUSH, CMD_NONE, invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'Z':
add_command(&command, CMD_ZERO, CMD_LIST|CMD_LIST_RULES,
- cs.invert);
+ invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'N':
parse_chain(optarg);
- add_command(&command, CMD_NEW_CHAIN, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_NEW_CHAIN, CMD_NONE, invert);
chain = optarg;
break;
case 'X':
add_command(&command, CMD_DELETE_CHAIN, CMD_NONE,
- cs.invert);
+ invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'E':
add_command(&command, CMD_RENAME_CHAIN, CMD_NONE,
- cs.invert);
+ invert);
chain = optarg;
if (xs_has_arg(argc, argv))
newname = argv[optind++];
case 'P':
add_command(&command, CMD_SET_POLICY, CMD_NONE,
- cs.invert);
+ invert);
chain = optarg;
if (xs_has_arg(argc, argv))
policy = argv[optind++];
*/
case 'p':
set_option(&cs.options, OPT_PROTOCOL, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
/* Canonicalize into lower case */
for (cs.protocol = optarg; *cs.protocol; cs.protocol++)
case 's':
set_option(&cs.options, OPT_SOURCE, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
shostnetworkmask = optarg;
break;
case 'd':
set_option(&cs.options, OPT_DESTINATION, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
dhostnetworkmask = optarg;
break;
#ifdef IP6T_F_GOTO
case 'g':
set_option(&cs.options, OPT_JUMP, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
cs.fw6.ipv6.flags |= IP6T_F_GOTO;
cs.jumpto = xt_parse_target(optarg);
break;
case 'j':
set_option(&cs.options, OPT_JUMP, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
command_jump(&cs, optarg);
break;
"Empty interface is likely to be "
"undesired");
set_option(&cs.options, OPT_VIANAMEIN, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
xtables_parse_interface(optarg,
cs.fw6.ipv6.iniface,
cs.fw6.ipv6.iniface_mask);
"Empty interface is likely to be "
"undesired");
set_option(&cs.options, OPT_VIANAMEOUT, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
xtables_parse_interface(optarg,
cs.fw6.ipv6.outiface,
cs.fw6.ipv6.outiface_mask);
case 'v':
if (!verbose)
set_option(&cs.options, OPT_VERBOSE,
- &cs.fw6.ipv6.invflags, cs.invert);
+ &cs.fw6.ipv6.invflags, invert);
verbose++;
break;
break;
case 'm':
- command_match(&cs);
+ command_match(&cs, invert);
break;
case 'n':
set_option(&cs.options, OPT_NUMERIC, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
break;
case 't':
- if (cs.invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"unexpected ! flag before --table");
if (restore && table_set)
case 'x':
set_option(&cs.options, OPT_EXPANDED, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
break;
case 'V':
- if (cs.invert)
+ if (invert)
printf("Not %s ;-)\n", prog_vers);
else
printf("%s v%s (legacy)\n",
case '0':
set_option(&cs.options, OPT_LINENUMBERS, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
break;
case 'M':
case 'c':
set_option(&cs.options, OPT_COUNTERS, &cs.fw6.ipv6.invflags,
- cs.invert);
+ invert);
pcnt = optarg;
bcnt = strchr(pcnt + 1, ',');
if (bcnt)
case 1: /* non option */
if (optarg[0] == '!' && optarg[1] == '\0') {
- if (cs.invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"multiple consecutive ! not"
" allowed");
- cs.invert = true;
+ invert = true;
optarg[0] = '\0';
continue;
}
exit_tryhelp(2);
default:
- if (command_default(&cs, &ip6tables_globals) == 1)
+ if (command_default(&cs, &ip6tables_globals, invert))
/*
* If new options were loaded, we must retry
* getopt immediately and not allow
- * cs.invert=false to be executed.
+ * invert=false to be executed.
*/
continue;
break;
}
- cs.invert = false;
+ invert = false;
}
if (!wait && wait_interval_set)
"unknown arguments found on commandline");
if (!command)
xtables_error(PARAMETER_PROBLEM, "no command specified");
- if (cs.invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"nothing appropriate following !");
struct xtables_target *t;
unsigned long long cnt;
bool table_set = false;
+ bool invert = false;
/* re-set optind to 0 in case do_command4 gets called
* a second time */
* Command selection
*/
case 'A':
- add_command(&command, CMD_APPEND, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_APPEND, CMD_NONE, invert);
chain = optarg;
break;
case 'C':
- add_command(&command, CMD_CHECK, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_CHECK, CMD_NONE, invert);
chain = optarg;
break;
case 'D':
- add_command(&command, CMD_DELETE, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_DELETE, CMD_NONE, invert);
chain = optarg;
if (xs_has_arg(argc, argv)) {
rulenum = parse_rulenumber(argv[optind++]);
break;
case 'R':
- add_command(&command, CMD_REPLACE, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_REPLACE, CMD_NONE, invert);
chain = optarg;
if (xs_has_arg(argc, argv))
rulenum = parse_rulenumber(argv[optind++]);
break;
case 'I':
- add_command(&command, CMD_INSERT, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_INSERT, CMD_NONE, invert);
chain = optarg;
if (xs_has_arg(argc, argv))
rulenum = parse_rulenumber(argv[optind++]);
case 'L':
add_command(&command, CMD_LIST,
- CMD_ZERO | CMD_ZERO_NUM, cs.invert);
+ CMD_ZERO | CMD_ZERO_NUM, invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'S':
add_command(&command, CMD_LIST_RULES,
- CMD_ZERO|CMD_ZERO_NUM, cs.invert);
+ CMD_ZERO|CMD_ZERO_NUM, invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
break;
case 'F':
- add_command(&command, CMD_FLUSH, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_FLUSH, CMD_NONE, invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'Z':
add_command(&command, CMD_ZERO, CMD_LIST|CMD_LIST_RULES,
- cs.invert);
+ invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'N':
parse_chain(optarg);
- add_command(&command, CMD_NEW_CHAIN, CMD_NONE,
- cs.invert);
+ add_command(&command, CMD_NEW_CHAIN, CMD_NONE, invert);
chain = optarg;
break;
case 'X':
add_command(&command, CMD_DELETE_CHAIN, CMD_NONE,
- cs.invert);
+ invert);
if (optarg) chain = optarg;
else if (xs_has_arg(argc, argv))
chain = argv[optind++];
case 'E':
add_command(&command, CMD_RENAME_CHAIN, CMD_NONE,
- cs.invert);
+ invert);
chain = optarg;
if (xs_has_arg(argc, argv))
newname = argv[optind++];
case 'P':
add_command(&command, CMD_SET_POLICY, CMD_NONE,
- cs.invert);
+ invert);
chain = optarg;
if (xs_has_arg(argc, argv))
policy = argv[optind++];
*/
case 'p':
set_option(&cs.options, OPT_PROTOCOL, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
/* Canonicalize into lower case */
for (cs.protocol = optarg; *cs.protocol; cs.protocol++)
case 's':
set_option(&cs.options, OPT_SOURCE, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
shostnetworkmask = optarg;
break;
case 'd':
set_option(&cs.options, OPT_DESTINATION, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
dhostnetworkmask = optarg;
break;
#ifdef IPT_F_GOTO
case 'g':
set_option(&cs.options, OPT_JUMP, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
cs.fw.ip.flags |= IPT_F_GOTO;
cs.jumpto = xt_parse_target(optarg);
break;
case 'j':
set_option(&cs.options, OPT_JUMP, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
command_jump(&cs, optarg);
break;
"Empty interface is likely to be "
"undesired");
set_option(&cs.options, OPT_VIANAMEIN, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
xtables_parse_interface(optarg,
cs.fw.ip.iniface,
cs.fw.ip.iniface_mask);
"Empty interface is likely to be "
"undesired");
set_option(&cs.options, OPT_VIANAMEOUT, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
xtables_parse_interface(optarg,
cs.fw.ip.outiface,
cs.fw.ip.outiface_mask);
case 'f':
set_option(&cs.options, OPT_FRAGMENT, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
cs.fw.ip.flags |= IPT_F_FRAG;
break;
case 'v':
if (!verbose)
set_option(&cs.options, OPT_VERBOSE,
- &cs.fw.ip.invflags, cs.invert);
+ &cs.fw.ip.invflags, invert);
verbose++;
break;
break;
case 'm':
- command_match(&cs);
+ command_match(&cs, invert);
break;
case 'n':
set_option(&cs.options, OPT_NUMERIC, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
break;
case 't':
- if (cs.invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"unexpected ! flag before --table");
if (restore && table_set)
case 'x':
set_option(&cs.options, OPT_EXPANDED, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
break;
case 'V':
- if (cs.invert)
+ if (invert)
printf("Not %s ;-)\n", prog_vers);
else
printf("%s v%s (legacy)\n",
case '0':
set_option(&cs.options, OPT_LINENUMBERS, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
break;
case 'M':
case 'c':
set_option(&cs.options, OPT_COUNTERS, &cs.fw.ip.invflags,
- cs.invert);
+ invert);
pcnt = optarg;
bcnt = strchr(pcnt + 1, ',');
if (bcnt)
case 1: /* non option */
if (optarg[0] == '!' && optarg[1] == '\0') {
- if (cs.invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"multiple consecutive ! not"
" allowed");
- cs.invert = true;
+ invert = true;
optarg[0] = '\0';
continue;
}
exit_tryhelp(2);
default:
- if (command_default(&cs, &iptables_globals) == 1)
+ if (command_default(&cs, &iptables_globals, invert))
/* cf. ip6tables.c */
continue;
break;
}
- cs.invert = false;
+ invert = false;
}
if (!wait && wait_interval_set)
"unknown arguments found on commandline");
if (!command)
xtables_error(PARAMETER_PROBLEM, "no command specified");
- if (cs.invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"nothing appropriate following !");
}
int command_default(struct iptables_command_state *cs,
- struct xtables_globals *gl)
+ struct xtables_globals *gl, bool invert)
{
struct xtables_rule_match *matchp;
struct xtables_match *m;
(cs->target->parse != NULL || cs->target->x6_parse != NULL) &&
cs->c >= cs->target->option_offset &&
cs->c < cs->target->option_offset + XT_OPTION_OFFSET_SCALE) {
- xtables_option_tpcall(cs->c, cs->argv, cs->invert,
+ xtables_option_tpcall(cs->c, cs->argv, invert,
cs->target, &cs->fw);
return 0;
}
if (cs->c < matchp->match->option_offset ||
cs->c >= matchp->match->option_offset + XT_OPTION_OFFSET_SCALE)
continue;
- xtables_option_mpcall(cs->c, cs->argv, cs->invert, m, &cs->fw);
+ xtables_option_mpcall(cs->c, cs->argv, invert, m, &cs->fw);
return 0;
}
printf(FMT("%-6s ", "out %s "), iface);
}
-void command_match(struct iptables_command_state *cs)
+void command_match(struct iptables_command_state *cs, bool invert)
{
struct option *opts = xt_params->opts;
struct xtables_match *m;
size_t size;
- if (cs->invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"unexpected ! flag before --match");
struct ip6t_entry fw6;
struct arpt_entry arp;
};
- int invert;
int c;
unsigned int options;
struct xtables_rule_match *matches;
const struct xtables_rule_match *);
extern const char *proto_to_name(uint8_t, int);
extern int command_default(struct iptables_command_state *,
- struct xtables_globals *);
+ struct xtables_globals *, bool invert);
extern struct xtables_match *load_proto(struct iptables_command_state *);
extern int subcmd_main(int, char **, const struct subcommand *);
extern void xs_init_target(struct xtables_target *);
void print_ifaces(const char *iniface, const char *outiface, uint8_t invflags,
unsigned int format);
-void command_match(struct iptables_command_state *cs);
+void command_match(struct iptables_command_state *cs, bool invert);
const char *xt_parse_target(const char *targetname);
void command_jump(struct iptables_command_state *cs, const char *jumpto);
while ((c = getopt_long(argc, argv,
"-A:D:I:N:E:X::L::Z::F::P:Vhi:o:j:c:p:s:d:t:M:", opts, NULL)) != -1) {
cs.c = c;
- cs.invert = ebt_invert;
switch (c) {
case 'A': /* Add a rule */
case 'D': /* Delete a rule */
while ((c = getopt_long(argc, argv,
"-A:D:C:I:N:E:X::L::Z::F::P:Vhi:o:j:c:p:s:d:t:M:", opts, NULL)) != -1) {
cs.c = c;
- cs.invert = ebt_invert;
switch (c) {
case 'A': /* Add a rule */
static void
set_option(unsigned int *options, unsigned int option, u_int16_t *invflg,
- int invert)
+ bool invert)
{
if (*options & option)
xtables_error(PARAMETER_PROBLEM, "multiple -%c flags not allowed",
struct timeval wait_interval;
struct xtables_target *t;
bool table_set = false;
+ bool invert = false;
int wait = 0;
memset(cs, 0, sizeof(*cs));
* Command selection
*/
case 'A':
- add_command(&p->command, CMD_APPEND, CMD_NONE,
- cs->invert);
+ add_command(&p->command, CMD_APPEND, CMD_NONE, invert);
p->chain = optarg;
break;
case 'C':
- add_command(&p->command, CMD_CHECK, CMD_NONE,
- cs->invert);
+ add_command(&p->command, CMD_CHECK, CMD_NONE, invert);
p->chain = optarg;
break;
case 'D':
- add_command(&p->command, CMD_DELETE, CMD_NONE,
- cs->invert);
+ add_command(&p->command, CMD_DELETE, CMD_NONE, invert);
p->chain = optarg;
if (xs_has_arg(argc, argv)) {
p->rulenum = parse_rulenumber(argv[optind++]);
break;
case 'R':
- add_command(&p->command, CMD_REPLACE, CMD_NONE,
- cs->invert);
+ add_command(&p->command, CMD_REPLACE, CMD_NONE, invert);
p->chain = optarg;
if (xs_has_arg(argc, argv))
p->rulenum = parse_rulenumber(argv[optind++]);
break;
case 'I':
- add_command(&p->command, CMD_INSERT, CMD_NONE,
- cs->invert);
+ add_command(&p->command, CMD_INSERT, CMD_NONE, invert);
p->chain = optarg;
if (xs_has_arg(argc, argv))
p->rulenum = parse_rulenumber(argv[optind++]);
case 'L':
add_command(&p->command, CMD_LIST,
- CMD_ZERO | CMD_ZERO_NUM, cs->invert);
+ CMD_ZERO | CMD_ZERO_NUM, invert);
if (optarg)
p->chain = optarg;
else if (xs_has_arg(argc, argv))
case 'S':
add_command(&p->command, CMD_LIST_RULES,
- CMD_ZERO|CMD_ZERO_NUM, cs->invert);
+ CMD_ZERO|CMD_ZERO_NUM, invert);
if (optarg)
p->chain = optarg;
else if (xs_has_arg(argc, argv))
break;
case 'F':
- add_command(&p->command, CMD_FLUSH, CMD_NONE,
- cs->invert);
+ add_command(&p->command, CMD_FLUSH, CMD_NONE, invert);
if (optarg)
p->chain = optarg;
else if (xs_has_arg(argc, argv))
case 'Z':
add_command(&p->command, CMD_ZERO,
- CMD_LIST|CMD_LIST_RULES, cs->invert);
+ CMD_LIST|CMD_LIST_RULES, invert);
if (optarg)
p->chain = optarg;
else if (xs_has_arg(argc, argv))
"chain name may not clash "
"with target name\n");
add_command(&p->command, CMD_NEW_CHAIN, CMD_NONE,
- cs->invert);
+ invert);
p->chain = optarg;
break;
case 'X':
add_command(&p->command, CMD_DELETE_CHAIN, CMD_NONE,
- cs->invert);
+ invert);
if (optarg)
p->chain = optarg;
else if (xs_has_arg(argc, argv))
case 'E':
add_command(&p->command, CMD_RENAME_CHAIN, CMD_NONE,
- cs->invert);
+ invert);
p->chain = optarg;
if (xs_has_arg(argc, argv))
p->newname = argv[optind++];
case 'P':
add_command(&p->command, CMD_SET_POLICY, CMD_NONE,
- cs->invert);
+ invert);
p->chain = optarg;
if (xs_has_arg(argc, argv))
p->policy = argv[optind++];
*/
case 'p':
set_option(&cs->options, OPT_PROTOCOL,
- &args->invflags, cs->invert);
+ &args->invflags, invert);
/* Canonicalize into lower case */
for (cs->protocol = optarg; *cs->protocol; cs->protocol++)
case 's':
set_option(&cs->options, OPT_SOURCE,
- &args->invflags, cs->invert);
+ &args->invflags, invert);
args->shostnetworkmask = optarg;
break;
case 'd':
set_option(&cs->options, OPT_DESTINATION,
- &args->invflags, cs->invert);
+ &args->invflags, invert);
args->dhostnetworkmask = optarg;
break;
#ifdef IPT_F_GOTO
case 'g':
set_option(&cs->options, OPT_JUMP, &args->invflags,
- cs->invert);
+ invert);
args->goto_set = true;
cs->jumpto = xt_parse_target(optarg);
break;
case 'j':
set_option(&cs->options, OPT_JUMP, &args->invflags,
- cs->invert);
+ invert);
command_jump(cs, optarg);
break;
"Empty interface is likely to be "
"undesired");
set_option(&cs->options, OPT_VIANAMEIN,
- &args->invflags, cs->invert);
+ &args->invflags, invert);
xtables_parse_interface(optarg,
args->iniface,
args->iniface_mask);
"Empty interface is likely to be "
"undesired");
set_option(&cs->options, OPT_VIANAMEOUT,
- &args->invflags, cs->invert);
+ &args->invflags, invert);
xtables_parse_interface(optarg,
args->outiface,
args->outiface_mask);
"use -m frag instead");
}
set_option(&cs->options, OPT_FRAGMENT, &args->invflags,
- cs->invert);
+ invert);
args->flags |= IPT_F_FRAG;
break;
case 'v':
if (!p->verbose)
set_option(&cs->options, OPT_VERBOSE,
- &args->invflags, cs->invert);
+ &args->invflags, invert);
p->verbose++;
break;
case 'm':
- command_match(cs);
+ command_match(cs, invert);
break;
case 'n':
set_option(&cs->options, OPT_NUMERIC, &args->invflags,
- cs->invert);
+ invert);
break;
case 't':
- if (cs->invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"unexpected ! flag before --table");
if (p->restore && table_set)
case 'x':
set_option(&cs->options, OPT_EXPANDED, &args->invflags,
- cs->invert);
+ invert);
break;
case 'V':
- if (cs->invert)
+ if (invert)
printf("Not %s ;-)\n", prog_vers);
else
printf("%s v%s (nf_tables)\n",
case '0':
set_option(&cs->options, OPT_LINENUMBERS,
- &args->invflags, cs->invert);
+ &args->invflags, invert);
break;
case 'M':
case 'c':
set_option(&cs->options, OPT_COUNTERS, &args->invflags,
- cs->invert);
+ invert);
args->pcnt = optarg;
args->bcnt = strchr(args->pcnt + 1, ',');
if (args->bcnt)
case 1: /* non option */
if (optarg[0] == '!' && optarg[1] == '\0') {
- if (cs->invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"multiple consecutive ! not"
" allowed");
- cs->invert = true;
+ invert = true;
optarg[0] = '\0';
continue;
}
exit_tryhelp(2);
default:
- if (command_default(cs, &xtables_globals) == 1)
+ if (command_default(cs, &xtables_globals, invert))
/* cf. ip6tables.c */
continue;
break;
}
- cs->invert = false;
+ invert = false;
}
if (strcmp(p->table, "nat") == 0 &&
"unknown arguments found on commandline");
if (!p->command)
xtables_error(PARAMETER_PROBLEM, "no command specified");
- if (cs->invert)
+ if (invert)
xtables_error(PARAMETER_PROBLEM,
"nothing appropriate following !");