diff options
author | Phil Sutter <phil@nwl.cc> | 2023-11-15 16:58:15 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-12-05 16:35:37 +0100 |
commit | e224f0b10ef01e3e2081054e7fa4f64601726646 (patch) | |
tree | 044422b2440e7f667df3e4d57807ccc670384507 /iptables/xshared.c | |
parent | ea7fef2a6f0457c44929bc8d1871257c15ed78ce (diff) |
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.c')
-rw-r--r-- | iptables/xshared.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |