AC_INIT([iptables], [1.4.5])
# See libtool.info "Libtool's versioning system"
-libxtables_vcurrent=3
-libxtables_vage=1
+libxtables_vcurrent=4
+libxtables_vage=0
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
xtables_error(PARAMETER_PROBLEM,
"HL: You must specify a value");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"HL: unexpected `!'");
xtables_error(PARAMETER_PROBLEM,
"Can't specify --log-level twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --log-level");
xtables_error(PARAMETER_PROBLEM,
"Can't specify --log-prefix twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --log-prefix");
switch(c) {
case '1':
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --reject-with");
for (i = 0; i < ARRAY_SIZE(reject_table); ++i)
if (*flags & IP6T_AH_SPI)
xtables_error(PARAMETER_PROBLEM,
"Only one `--ahspi' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_ah_spis(argv[optind-1], ahinfo->spis);
if (invert)
ahinfo->invflags |= IP6T_AH_INV_SPI;
if (*flags & IP6T_AH_LEN)
xtables_error(PARAMETER_PROBLEM,
"Only one `--ahlen' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
ahinfo->hdrlen = parse_ah_spi(argv[optind-1], "length");
if (invert)
ahinfo->invflags |= IP6T_AH_INV_LEN;
if (*flags & IP6T_OPTS_LEN)
xtables_error(PARAMETER_PROBLEM,
"Only one `--dst-len' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
optinfo->hdrlen = parse_opts_num(argv[optind-1], "length");
if (invert)
optinfo->invflags |= IP6T_OPTS_INV_LEN;
if (*flags & IP6T_OPTS_OPTS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--dst-opts' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
" '!' not allowed with `--dst-opts'");
if (*flags & IP6T_FRAG_IDS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--fragid' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_frag_ids(argv[optind-1], fraginfo->ids);
if (invert)
fraginfo->invflags |= IP6T_FRAG_INV_IDS;
if (*flags & IP6T_FRAG_LEN)
xtables_error(PARAMETER_PROBLEM,
"Only one `--fraglen' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
fraginfo->hdrlen = parse_frag_id(argv[optind-1], "length");
if (invert)
fraginfo->invflags |= IP6T_FRAG_INV_LEN;
if (*flags & IP6T_OPTS_LEN)
xtables_error(PARAMETER_PROBLEM,
"Only one `--hbh-len' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
optinfo->hdrlen = parse_opts_num(argv[optind-1], "length");
if (invert)
optinfo->invflags |= IP6T_OPTS_INV_LEN;
if (*flags & IP6T_OPTS_OPTS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--hbh-opts' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
" '!' not allowed with `--hbh-opts'");
struct ip6t_hl_info *info = (struct ip6t_hl_info *) (*match)->data;
u_int8_t value;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
value = atoi(argv[optind-1]);
if (*flags)
if (*flags == 1)
xtables_error(PARAMETER_PROBLEM,
"icmpv6 match: only use --icmpv6-type once!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_icmpv6(argv[optind-1], &icmpv6info->type,
icmpv6info->code);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"Only one `--header' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (! (info->matchflags = parse_header(argv[optind-1])) )
xtables_error(PARAMETER_PROBLEM, "ip6t_ipv6header: cannot parse header names");
if (*flags & MH_TYPES)
xtables_error(PARAMETER_PROBLEM,
"Only one `--mh-type' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_mh_types(argv[optind-1], mhinfo->types);
if (invert)
mhinfo->invflags |= IP6T_MH_INV_TYPE;
if (*flags & IP6T_RT_TYP)
xtables_error(PARAMETER_PROBLEM,
"Only one `--rt-type' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
rtinfo->rt_type = parse_rt_num(argv[optind-1], "type");
if (invert)
rtinfo->invflags |= IP6T_RT_INV_TYP;
if (*flags & IP6T_RT_SGS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--rt-segsleft' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_rt_segsleft(argv[optind-1], rtinfo->segsleft);
if (invert)
rtinfo->invflags |= IP6T_RT_INV_SGS;
if (*flags & IP6T_RT_LEN)
xtables_error(PARAMETER_PROBLEM,
"Only one `--rt-len' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
rtinfo->hdrlen = parse_rt_num(argv[optind-1], "length");
if (invert)
rtinfo->invflags |= IP6T_RT_INV_LEN;
if ( !(*flags & IP6T_RT_TYP) || (rtinfo->rt_type != 0) || (rtinfo->invflags & IP6T_RT_INV_TYP) )
xtables_error(PARAMETER_PROBLEM,
"`--rt-type 0' required before `--rt-0-addrs'");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
" '!' not allowed with `--rt-0-addrs'");
switch (c) {
case '1':
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --to-destination");
xtables_error(PARAMETER_PROBLEM,
"Can't specify --log-level twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --log-level");
xtables_error(PARAMETER_PROBLEM,
"Can't specify --log-prefix twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --log-prefix");
xtables_error(PARAMETER_PROBLEM,
"Need TCP, UDP, SCTP or DCCP with port specification");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --to-ports");
switch (c) {
case '1':
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --%s", NETMAP_opts[0].name);
xtables_error(PARAMETER_PROBLEM,
"Need TCP, UDP, SCTP or DCCP with port specification");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --to-ports");
switch(c) {
case '1':
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --reject-with");
for (i = 0; i < limit; i++) {
"Too many ranges specified, maximum "
"is %i ranges.\n",
IPT_SAME_MAX_RANGE);
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --to");
xtables_error(PARAMETER_PROBLEM,
"--%s can be specified only once", what);
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --%s", what);
switch (c) {
case '1':
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --to-source");
xtables_error(PARAMETER_PROBLEM,
"TTL: You must specify a value");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"TTL: unexpected `!'");
xtables_error(PARAMETER_PROBLEM,
"Can't specify --ulog-nlgroup twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --ulog-nlgroup");
group_d = atoi(optarg);
xtables_error(PARAMETER_PROBLEM,
"Can't specify --ulog-prefix twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --ulog-prefix");
if (*flags&IPT_ADDRTYPE_OPT_SRCTYPE)
xtables_error(PARAMETER_PROBLEM,
"addrtype: can't specify src-type twice");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_types(argv[optind-1], &info->source);
if (invert)
info->invert_source = 1;
if (*flags&IPT_ADDRTYPE_OPT_DSTTYPE)
xtables_error(PARAMETER_PROBLEM,
"addrtype: can't specify dst-type twice");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_types(argv[optind-1], &info->dest);
if (invert)
info->invert_dest = 1;
if (*flags & IPT_ADDRTYPE_OPT_SRCTYPE)
xtables_error(PARAMETER_PROBLEM,
"addrtype: can't specify src-type twice");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_types(argv[optind-1], &info->source);
if (invert)
info->flags |= IPT_ADDRTYPE_INVERT_SOURCE;
if (*flags & IPT_ADDRTYPE_OPT_DSTTYPE)
xtables_error(PARAMETER_PROBLEM,
"addrtype: can't specify dst-type twice");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_types(argv[optind-1], &info->dest);
if (invert)
info->flags |= IPT_ADDRTYPE_INVERT_DEST;
if (*flags & AH_SPI)
xtables_error(PARAMETER_PROBLEM,
"Only one `--ahspi' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_ah_spis(argv[optind-1], ahinfo->spis);
if (invert)
ahinfo->invflags |= IPT_AH_INV_SPI;
if (*flags & IPT_ECN_OP_MATCH_CWR)
xtables_error(PARAMETER_PROBLEM,
"ECN match: can only use parameter ONCE!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
einfo->operation |= IPT_ECN_OP_MATCH_CWR;
if (invert)
einfo->invert |= IPT_ECN_OP_MATCH_CWR;
if (*flags & IPT_ECN_OP_MATCH_ECE)
xtables_error(PARAMETER_PROBLEM,
"ECN match: can only use parameter ONCE!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
einfo->operation |= IPT_ECN_OP_MATCH_ECE;
if (invert)
einfo->invert |= IPT_ECN_OP_MATCH_ECE;
if (*flags & IPT_ECN_OP_MATCH_IP)
xtables_error(PARAMETER_PROBLEM,
"ECN match: can only use parameter ONCE!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
einfo->invert |= IPT_ECN_OP_MATCH_IP;
*flags |= IPT_ECN_OP_MATCH_IP;
if (*flags == 1)
xtables_error(PARAMETER_PROBLEM,
"icmp match: only use --icmp-type once!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_icmp(argv[optind-1], &icmpinfo->type,
icmpinfo->code);
if (invert)
switch (c) {
char *end;
case '1':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
end = optarg = argv[optind-1];
realminfo->id = strtoul(optarg, &end, 0);
if (end != optarg && (*end == '/' || *end == '\0')) {
xtables_error(PARAMETER_PROBLEM,
"--match-set can be specified only once");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
info->flags[0] |= IPSET_MATCH_INV;
struct ipt_ttl_info *info = (struct ipt_ttl_info *) (*match)->data;
unsigned int value;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
switch (c) {
case '2':
if (*flags & NFLOG_GROUP)
xtables_error(PARAMETER_PROBLEM,
"Can't specify --nflog-group twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --nflog-group");
if (*flags & NFLOG_PREFIX)
xtables_error(PARAMETER_PROBLEM,
"Can't specify --nflog-prefix twice");
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM,
"Unexpected `!' after --nflog-prefix");
"`--cluster-local-nodemask' and "
"`--cluster-local-node'");
}
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (!xtables_strtoui(optarg, NULL, &num, 1,
XT_CLUSTER_NODES_MAX)) {
"`--cluster-local-nodemask' and "
"`--cluster-local-node'");
}
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (!xtables_strtoui(optarg, NULL, &num, 1,
XT_CLUSTER_NODES_MAX)) {
switch (c) {
case '1':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
if (invert) {
xtables_error(PARAMETER_PROBLEM,
"Sorry, you can't have an inverted comment");
switch (c) {
case '1':
- if (xtables_check_inverse(optarg, &invert, &optind, 0))
+ if (xtables_check_inverse(optarg, &invert, &optind, 0, argv))
optind++;
parse_range(argv[optind-1], sinfo);
xtables_error(PARAMETER_PROBLEM,
"--connlimit-above may be given only once");
*flags |= 0x1;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
info->limit = strtoul(argv[optind-1], NULL, 0);
info->inverse = invert;
break;
switch (c) {
char *end;
case '1':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
markinfo->mark = strtoul(optarg, &end, 0);
markinfo->mask = 0xffffffffUL;
switch (c) {
case '1':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_states(argv[optind-1], sinfo);
if (invert) {
break;
case '2':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if(invert)
sinfo->invflags |= XT_CONNTRACK_PROTO;
break;
case '3':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
sinfo->invflags |= XT_CONNTRACK_ORIGSRC;
break;
case '4':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
sinfo->invflags |= XT_CONNTRACK_ORIGDST;
break;
case '5':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
sinfo->invflags |= XT_CONNTRACK_REPLSRC;
break;
case '6':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
sinfo->invflags |= XT_CONNTRACK_REPLDST;
break;
case '7':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_statuses(argv[optind-1], sinfo);
if (invert) {
break;
case '8':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_expires(argv[optind-1], sinfo);
if (invert) {
xtables_error(PARAMETER_PROBLEM,
"Only one `--source-port' allowed");
einfo->flags |= XT_DCCP_SRC_PORTS;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_dccp_ports(argv[optind-1], einfo->spts);
if (invert)
einfo->invflags |= XT_DCCP_SRC_PORTS;
xtables_error(PARAMETER_PROBLEM,
"Only one `--destination-port' allowed");
einfo->flags |= XT_DCCP_DEST_PORTS;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_dccp_ports(argv[optind-1], einfo->dpts);
if (invert)
einfo->invflags |= XT_DCCP_DEST_PORTS;
xtables_error(PARAMETER_PROBLEM,
"Only one `--dccp-types' allowed");
einfo->flags |= XT_DCCP_TYPE;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
einfo->typemask = parse_dccp_types(argv[optind-1]);
if (invert)
einfo->invflags |= XT_DCCP_TYPE;
xtables_error(PARAMETER_PROBLEM,
"Only one `--dccp-option' allowed");
einfo->flags |= XT_DCCP_OPTION;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
einfo->option = parse_dccp_option(argv[optind-1]);
if (invert)
einfo->invflags |= XT_DCCP_OPTION;
if (*flags)
xtables_error(PARAMETER_PROBLEM,
"DSCP match: Only use --dscp ONCE!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_dscp(argv[optind-1], dinfo);
if (invert)
dinfo->invert = 1;
if (*flags)
xtables_error(PARAMETER_PROBLEM,
"DSCP match: Only use --dscp-class ONCE!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_class(argv[optind - 1], dinfo);
if (invert)
dinfo->invert = 1;
if (*flags & ESP_SPI)
xtables_error(PARAMETER_PROBLEM,
"Only one `--espspi' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_esp_spis(argv[optind-1], espinfo->spis);
if (invert)
espinfo->invflags |= XT_ESP_INV_SPI;
case '%':
xtables_param_act(XTF_ONLY_ONCE, "hashlimit", "--hashlimit",
*flags & PARAM_LIMIT);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!parse_rate(optarg, &r->cfg.avg))
xtables_error(PARAMETER_PROBLEM,
"bad rate `%s'", optarg);
case '$':
xtables_param_act(XTF_ONLY_ONCE, "hashlimit", "--hashlimit-burst",
*flags & PARAM_BURST);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!xtables_strtoui(optarg, NULL, &num, 0, 10000))
xtables_error(PARAMETER_PROBLEM,
"bad --hashlimit-burst `%s'", optarg);
case '&':
xtables_param_act(XTF_ONLY_ONCE, "hashlimit", "--hashlimit-htable-size",
*flags & PARAM_SIZE);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!xtables_strtoui(optarg, NULL, &num, 0, UINT32_MAX))
xtables_error(PARAMETER_PROBLEM,
"bad --hashlimit-htable-size: `%s'", optarg);
case '*':
xtables_param_act(XTF_ONLY_ONCE, "hashlimit", "--hashlimit-htable-max",
*flags & PARAM_MAX);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!xtables_strtoui(optarg, NULL, &num, 0, UINT32_MAX))
xtables_error(PARAMETER_PROBLEM,
"bad --hashlimit-htable-max: `%s'", optarg);
xtables_param_act(XTF_ONLY_ONCE, "hashlimit",
"--hashlimit-htable-gcinterval",
*flags & PARAM_GCINTERVAL);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!xtables_strtoui(optarg, NULL, &num, 0, UINT32_MAX))
xtables_error(PARAMETER_PROBLEM,
"bad --hashlimit-htable-gcinterval: `%s'",
case ')':
xtables_param_act(XTF_ONLY_ONCE, "hashlimit",
"--hashlimit-htable-expire", *flags & PARAM_EXPIRE);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!xtables_strtoui(optarg, NULL, &num, 0, UINT32_MAX))
xtables_error(PARAMETER_PROBLEM,
"bad --hashlimit-htable-expire: `%s'", optarg);
case '_':
xtables_param_act(XTF_ONLY_ONCE, "hashlimit", "--hashlimit-mode",
*flags & PARAM_MODE);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (parse_mode(&r->cfg.mode, optarg) < 0)
xtables_error(PARAMETER_PROBLEM,
"bad --hashlimit-mode: `%s'\n", optarg);
case '"':
xtables_param_act(XTF_ONLY_ONCE, "hashlimit", "--hashlimit-name",
*flags & PARAM_NAME);
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (strlen(optarg) == 0)
xtables_error(PARAMETER_PROBLEM, "Zero-length name?");
strncpy(r->name, optarg, sizeof(r->name));
if (*flags)
xtables_error(PARAMETER_PROBLEM,
"helper match: Only use --helper ONCE!");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
strncpy(info->name, optarg, 29);
info->name[29] = '\0';
if (invert)
*flags |= IPRANGE_SRC;
info->flags |= IPRANGE_SRC;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
info->flags |= IPRANGE_SRC_INV;
iprange_parse_range(optarg, range, NFPROTO_IPV4, "--src-range");
*flags |= IPRANGE_DST;
info->flags |= IPRANGE_DST;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
info->flags |= IPRANGE_DST_INV;
xtables_error(PARAMETER_PROBLEM,
"length: `--length' may only be "
"specified once");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_lengths(argv[optind-1], info);
if (invert)
info->invert = 1;
switch(c) {
case '%':
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!parse_rate(optarg, &r->avg))
xtables_error(PARAMETER_PROBLEM,
"bad rate `%s'", optarg);
break;
case '$':
- if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0)) break;
+ if (xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv)) break;
if (!xtables_strtoui(optarg, NULL, &num, 0, 10000))
xtables_error(PARAMETER_PROBLEM,
"bad --limit-burst `%s'", optarg);
switch (c) {
case '1':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_mac(argv[optind-1], macinfo);
if (invert)
macinfo->invert = 1;
switch (c) {
char *end;
case '1':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
markinfo->mark = strtoul(optarg, &end, 0);
if (*end == '/') {
markinfo->mask = strtoul(end+1, &end, 0);
switch (c) {
case '1':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
proto = check_proto(pnum, invflags);
multiinfo->count = parse_multi_ports(argv[optind-1],
multiinfo->ports, proto);
break;
case '2':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
proto = check_proto(pnum, invflags);
multiinfo->count = parse_multi_ports(argv[optind-1],
multiinfo->ports, proto);
break;
case '3':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
proto = check_proto(pnum, invflags);
multiinfo->count = parse_multi_ports(argv[optind-1],
multiinfo->ports, proto);
switch (c) {
case '1':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
proto = check_proto(pnum, invflags);
parse_multi_ports_v1(argv[optind-1], multiinfo, proto);
multiinfo->flags = XT_MULTIPORT_SOURCE;
break;
case '2':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
proto = check_proto(pnum, invflags);
parse_multi_ports_v1(argv[optind-1], multiinfo, proto);
multiinfo->flags = XT_MULTIPORT_DESTINATION;
break;
case '3':
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
proto = check_proto(pnum, invflags);
parse_multi_ports_v1(argv[optind-1], multiinfo, proto);
multiinfo->flags = XT_MULTIPORT_EITHER;
case '1':
if (*flags & XT_PHYSDEV_OP_IN)
goto multiple_use;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
xtables_parse_interface(argv[optind-1], info->physindev,
(unsigned char *)info->in_mask);
if (invert)
case '2':
if (*flags & XT_PHYSDEV_OP_OUT)
goto multiple_use;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
xtables_parse_interface(argv[optind-1], info->physoutdev,
(unsigned char *)info->out_mask);
if (invert)
case '3':
if (*flags & XT_PHYSDEV_OP_ISIN)
goto multiple_use;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
info->bitmask |= XT_PHYSDEV_OP_ISIN;
if (invert)
info->invert |= XT_PHYSDEV_OP_ISIN;
case '4':
if (*flags & XT_PHYSDEV_OP_ISOUT)
goto multiple_use;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
info->bitmask |= XT_PHYSDEV_OP_ISOUT;
if (invert)
info->invert |= XT_PHYSDEV_OP_ISOUT;
case '5':
if (*flags & XT_PHYSDEV_OP_BRIDGED)
goto multiple_use;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
info->invert |= XT_PHYSDEV_OP_BRIDGED;
*flags |= XT_PHYSDEV_OP_BRIDGED;
switch(c)
{
case '1':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_pkttype(argv[optind-1], info);
if(invert)
info->invert=1;
xtables_error(PARAMETER_PROBLEM, "policy match: invalid mode \"%s\"", s);
}
-static int policy_parse(int c, int invert, unsigned int *flags,
+static int policy_parse(int c, char **argv, int invert, unsigned int *flags,
struct xt_policy_info *info, uint8_t family)
{
struct xt_policy_elem *e = &info->pol[info->len];
unsigned int naddr = 0, num;
int mode;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
switch (c) {
case '1':
static int policy4_parse(int c, char **argv, int invert, unsigned int *flags,
const void *entry, struct xt_entry_match **match)
{
- return policy_parse(c, invert, flags, (void *)(*match)->data,
+ return policy_parse(c, argv, invert, flags, (void *)(*match)->data,
NFPROTO_IPV4);
}
static int policy6_parse(int c, char **argv, int invert, unsigned int *flags,
const void *entry, struct xt_entry_match **match)
{
- return policy_parse(c, invert, flags, (void *)(*match)->data,
+ return policy_parse(c, argv, invert, flags, (void *)(*match)->data,
NFPROTO_IPV6);
}
switch (c) {
case '1':
- if (xtables_check_inverse(optarg, &invert, NULL, 0))
+ if (xtables_check_inverse(optarg, &invert, NULL, 0, argv))
xtables_error(PARAMETER_PROBLEM, "quota: unexpected '!'");
if (!parse_quota(optarg, &info->quota))
xtables_error(PARAMETER_PROBLEM,
switch (c) {
case OPT_RATEEST1:
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"rateest: rateest can't be inverted");
break;
case OPT_RATEEST2:
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"rateest: rateest can't be inverted");
break;
case OPT_RATEEST_BPS1:
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"rateest: rateest-bps can't be inverted");
break;
case OPT_RATEEST_PPS1:
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"rateest: rateest-pps can't be inverted");
break;
case OPT_RATEEST_BPS2:
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"rateest: rateest-bps can't be inverted");
break;
case OPT_RATEEST_PPS2:
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"rateest: rateest-pps can't be inverted");
break;
case OPT_RATEEST_DELTA:
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (invert)
xtables_error(PARAMETER_PROBLEM,
"rateest: rateest-delta can't be inverted");
break;
case OPT_RATEEST_EQ:
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
if (*flags & (1 << c))
xtables_error(PARAMETER_PROBLEM,
break;
case OPT_RATEEST_LT:
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
if (*flags & (1 << c))
xtables_error(PARAMETER_PROBLEM,
break;
case OPT_RATEEST_GT:
- xtables_check_inverse(argv[optind-1], &invert, &optind, 0);
+ xtables_check_inverse(argv[optind-1], &invert, &optind, 0, argv);
if (*flags & (1 << c))
xtables_error(PARAMETER_PROBLEM,
xtables_error(PARAMETER_PROBLEM,
"recent: only one of `--set', `--rcheck' "
"`--update' or `--remove' may be set");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
info->check_set |= XT_RECENT_SET;
if (invert) info->invert = 1;
*flags |= XT_RECENT_SET;
xtables_error(PARAMETER_PROBLEM,
"recent: only one of `--set', `--rcheck' "
"`--update' or `--remove' may be set");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
info->check_set |= XT_RECENT_CHECK;
if(invert) info->invert = 1;
*flags |= XT_RECENT_CHECK;
xtables_error(PARAMETER_PROBLEM,
"recent: only one of `--set', `--rcheck' "
"`--update' or `--remove' may be set");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
info->check_set |= XT_RECENT_UPDATE;
if (invert) info->invert = 1;
*flags |= XT_RECENT_UPDATE;
xtables_error(PARAMETER_PROBLEM,
"recent: only one of `--set', `--rcheck' "
"`--update' or `--remove' may be set");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
info->check_set |= XT_RECENT_REMOVE;
if (invert) info->invert = 1;
*flags |= XT_RECENT_REMOVE;
xtables_error(PARAMETER_PROBLEM,
"Only one `--source-port' allowed");
einfo->flags |= XT_SCTP_SRC_PORTS;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_sctp_ports(argv[optind-1], einfo->spts);
if (invert)
einfo->invflags |= XT_SCTP_SRC_PORTS;
xtables_error(PARAMETER_PROBLEM,
"Only one `--destination-port' allowed");
einfo->flags |= XT_SCTP_DEST_PORTS;
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_sctp_ports(argv[optind-1], einfo->dpts);
if (invert)
einfo->invflags |= XT_SCTP_DEST_PORTS;
if (*flags & XT_SCTP_CHUNK_TYPES)
xtables_error(PARAMETER_PROBLEM,
"Only one `--chunk-types' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (!argv[optind]
|| argv[optind][0] == '-' || argv[optind][0] == '!')
switch (c) {
case '1':
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
state_parse_states(argv[optind-1], sinfo);
if (invert)
if (*flags & STRING)
xtables_error(PARAMETER_PROBLEM,
"Can't specify multiple --string");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_string(argv[optind-1], stringinfo);
if (invert) {
if (revision == 0)
xtables_error(PARAMETER_PROBLEM,
"Can't specify multiple --hex-string");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_hex_string(argv[optind-1], stringinfo); /* sets length */
if (invert) {
if (revision == 0)
if (*flags & TCP_SRC_PORTS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--source-port' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_tcp_ports(argv[optind-1], tcpinfo->spts);
if (invert)
tcpinfo->invflags |= XT_TCP_INV_SRCPT;
if (*flags & TCP_DST_PORTS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--destination-port' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_tcp_ports(argv[optind-1], tcpinfo->dpts);
if (invert)
tcpinfo->invflags |= XT_TCP_INV_DSTPT;
xtables_error(PARAMETER_PROBLEM,
"Only one of `--syn' or `--tcp-flags' "
" allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
if (!argv[optind]
|| argv[optind][0] == '-' || argv[optind][0] == '!')
if (*flags & TCP_OPTION)
xtables_error(PARAMETER_PROBLEM,
"Only one `--tcp-option' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_tcp_option(argv[optind-1], &tcpinfo->option);
if (invert)
tcpinfo->invflags |= XT_TCP_INV_OPTION;
if (*flags)
xtables_error(PARAMETER_PROBLEM,
"Only one `--mss' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_tcp_mssvalues(argv[optind-1],
&mssinfo->mss_min, &mssinfo->mss_max);
if (invert)
if (*flags & UDP_SRC_PORTS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--source-port' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_udp_ports(argv[optind-1], udpinfo->spts);
if (invert)
udpinfo->invflags |= XT_UDP_INV_SRCPT;
if (*flags & UDP_DST_PORTS)
xtables_error(PARAMETER_PROBLEM,
"Only one `--destination-port' allowed");
- xtables_check_inverse(optarg, &invert, &optind, 0);
+ xtables_check_inverse(optarg, &invert, &optind, 0, argv);
parse_udp_ports(argv[optind-1], udpinfo->dpts);
if (invert)
udpinfo->invflags |= XT_UDP_INV_DSTPT;
#define aligned_u64 u_int64_t __attribute__((aligned(8)))
int xtables_check_inverse(const char option[], int *invert,
- int *my_optind, int argc);
+ int *my_optind, int argc, char **argv);
extern struct xtables_globals *xt_params;
#define xtables_error (xt_params->exit_err)
* Option selection
*/
case 'p':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_PROTOCOL, &fw.ipv6.invflags,
invert);
break;
case 's':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_SOURCE, &fw.ipv6.invflags,
invert);
shostnetworkmask = argv[optind-1];
break;
case 'd':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_DESTINATION, &fw.ipv6.invflags,
invert);
dhostnetworkmask = argv[optind-1];
case 'i':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_VIANAMEIN, &fw.ipv6.invflags,
invert);
xtables_parse_interface(argv[optind-1],
break;
case 'o':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_VIANAMEOUT, &fw.ipv6.invflags,
invert);
xtables_parse_interface(argv[optind-1],
* Option selection
*/
case 'p':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_PROTOCOL, &fw.ip.invflags,
invert);
break;
case 's':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_SOURCE, &fw.ip.invflags,
invert);
shostnetworkmask = argv[optind-1];
break;
case 'd':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_DESTINATION, &fw.ip.invflags,
invert);
dhostnetworkmask = argv[optind-1];
case 'i':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_VIANAMEIN, &fw.ip.invflags,
invert);
xtables_parse_interface(argv[optind-1],
break;
case 'o':
- xtables_check_inverse(optarg, &invert, &optind, argc);
+ xtables_check_inverse(optarg, &invert, &optind, argc, argv);
set_option(&options, OPT_VIANAMEOUT, &fw.ip.invflags,
invert);
xtables_parse_interface(argv[optind-1],
* Do not use in new code.
*/
int xtables_check_inverse(const char option[], int *invert,
- int *my_optind, int argc)
+ int *my_optind, int argc, char **argv)
{
if (option == NULL || strcmp(option, "!") != 0)
return false;
"Multiple `!' flags not allowed");
*invert = true;
if (my_optind != NULL) {
+ optarg = argv[*my_optind];
++*my_optind;
if (argc && *my_optind > argc)
xt_params->exit_err(PARAMETER_PROBLEM,