diff options
author | Phil Sutter <phil@nwl.cc> | 2021-12-23 18:55:53 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2022-01-12 14:08:41 +0100 |
commit | 3039a52c3ecf96df4e3b815d242f788c189093e1 (patch) | |
tree | 58e536a794f5a28f3db2c934d23cd1ee15c8e3af /iptables/xtables-translate.c | |
parent | ece001c258e3fd8779e177ef00394877f2327f56 (diff) |
xtables: Do not pass nft_handle to do_parse()
Make it fit for sharing with legacy iptables, drop nft-specific
parameter. This requires to mirror proto_parse and post_parse callbacks
from family_ops somewhere reachable - use xt_cmd_parse, it holds other
"parser setup data" as well.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-translate.c')
-rw-r--r-- | iptables/xtables-translate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c index 9d312b24..c287d3bd 100644 --- a/iptables/xtables-translate.c +++ b/iptables/xtables-translate.c @@ -252,6 +252,7 @@ static int do_command_xlate(struct nft_handle *h, int argc, char *argv[], .table = *table, .restore = restore, .xlate = true, + .ops = &h->ops->cmd_parse, }; struct iptables_command_state cs = { .jumpto = "", @@ -265,7 +266,7 @@ static int do_command_xlate(struct nft_handle *h, int argc, char *argv[], if (h->ops->init_cs) h->ops->init_cs(&cs); - do_parse(h, argc, argv, &p, &cs, &args); + do_parse(argc, argv, &p, &cs, &args); cs.restore = restore; |