.post_parse = ipv6_post_parse,
.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
+ .command_default = command_default,
};
struct xt_cmd_parse p = {
.table = *table,
.post_parse = ipv4_post_parse,
.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
+ .command_default = command_default,
};
struct xt_cmd_parse p = {
.table = *table,
.post_parse = nft_arp_post_parse,
.option_name = nft_arp_option_name,
.option_invert = nft_arp_option_invert,
+ .command_default = command_default,
},
.rule_to_cs = nft_rule_to_iptables_command_state,
.init_cs = nft_arp_init_cs,
.post_parse = ipv4_post_parse,
.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
+ .command_default = command_default,
},
.rule_to_cs = nft_rule_to_iptables_command_state,
.clear_cs = xtables_clear_iptables_command_state,
.post_parse = ipv6_post_parse,
.option_name = ip46t_option_name,
.option_invert = ip46t_option_invert,
+ .command_default = command_default,
},
.rule_to_cs = nft_rule_to_iptables_command_state,
.clear_cs = xtables_clear_iptables_command_state,
cs->options & OPT_NUMERIC, &cs->matches);
}
-static int command_default(struct iptables_command_state *cs,
- struct xtables_globals *gl, bool invert)
+int command_default(struct iptables_command_state *cs,
+ struct xtables_globals *gl, bool invert)
{
struct xtables_rule_match *matchp;
struct xtables_match *m;
exit_tryhelp(2, p->line);
default:
- if (command_default(cs, xt_params, invert))
+ if (p->ops->command_default(cs, xt_params, invert))
/* cf. ip6tables.c */
continue;
break;
struct xtables_args *args);
const char *(*option_name)(int option);
int (*option_invert)(int option);
+ int (*command_default)(struct iptables_command_state *cs,
+ struct xtables_globals *gl, bool invert);
};
struct xt_cmd_parse {
const char *ip46t_option_name(int option);
int ip46t_option_invert(int option);
+int command_default(struct iptables_command_state *cs,
+ struct xtables_globals *gl, bool invert);
void do_parse(int argc, char *argv[],
struct xt_cmd_parse *p, struct iptables_command_state *cs,