diff options
author | Phil Sutter <phil@nwl.cc> | 2024-10-09 17:49:41 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-10-16 15:34:50 +0200 |
commit | 4d36046edada7a6cd4a619ac53496a6d74947f65 (patch) | |
tree | 23b812a5b65eb758d678544c9d132210adcd8811 | |
parent | 05af72ca6184f08435c1ef31436e1eb7ac931e14 (diff) |
ebtables: Fix for -S with rule number
For NFT_COMPAT_RULE_SAVE, one has to store the rule number, not its
index in nft_cmd object.
Fixes: 58d364c7120b5 ("ebtables: Use do_parse() from xshared")
Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r-- | iptables/xtables-eb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index 45663a3a..658cf4b9 100644 --- a/iptables/xtables-eb.c +++ b/iptables/xtables-eb.c @@ -619,7 +619,7 @@ int do_commandeb(struct nft_handle *h, int argc, char *argv[], char **table, cs.options&OPT_LIST_C); else if (p.command & CMD_LIST_RULES) ret = nft_cmd_rule_list_save(h, p.chain, p.table, - p.rulenum - 1, + p.rulenum, cs.options & OPT_VERBOSE); if (ret && (p.command & CMD_ZERO)) ret = nft_cmd_chain_zero_counters(h, p.chain, p.table, |