From e224f0b10ef01e3e2081054e7fa4f64601726646 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 15 Nov 2023 16:58:15 +0100 Subject: xshared: Turn command_default() into a callback Ebtables' variant is pretty different since all extensions are loaded up front and some targets serve as "watcher" extensions, so let variants specify the function to call for extension parameters. Signed-off-by: Phil Sutter --- iptables/xshared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'iptables/xshared.c') diff --git a/iptables/xshared.c b/iptables/xshared.c index ff809f2b..29b39929 100644 --- a/iptables/xshared.c +++ b/iptables/xshared.c @@ -122,8 +122,8 @@ static struct xtables_match *load_proto(struct iptables_command_state *cs) 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; @@ -1784,7 +1784,7 @@ void do_parse(int argc, char *argv[], 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; -- cgit v1.2.3