diff options
author | Phil Sutter <phil@nwl.cc> | 2022-11-25 21:42:20 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2022-12-02 01:44:17 +0100 |
commit | 365647ef056828bc3cb56efef12114951fcb730d (patch) | |
tree | 0db3ee2b2d7167d7de0ce24a7254e9c068c309bd /iptables/nft-ipv4.c | |
parent | fb63f8b7337aa11a667537e6a3b399062ede2eb5 (diff) |
xtables: Introduce xtables_clear_iptables_command_state()
This is nft_clear_iptables_command_state() but in a location reachable
by legacy iptables, too.
Changes callers in non-family-specific code to use clear_cs callback
instead of directly calling it - ebtables still has a custom variant.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft-ipv4.c')
-rw-r--r-- | iptables/nft-ipv4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c index 6c62dd46..42167351 100644 --- a/iptables/nft-ipv4.c +++ b/iptables/nft-ipv4.c @@ -247,7 +247,7 @@ static void nft_ipv4_print_rule(struct nft_handle *h, struct nftnl_rule *r, if (!(format & FMT_NONEWLINE)) fputc('\n', stdout); - nft_clear_iptables_command_state(&cs); + xtables_clear_iptables_command_state(&cs); } static void nft_ipv4_save_rule(const struct iptables_command_state *cs, @@ -454,7 +454,7 @@ struct nft_family_ops nft_family_ops_ipv4 = { }, .parse_target = nft_ipv46_parse_target, .rule_to_cs = nft_rule_to_iptables_command_state, - .clear_cs = nft_clear_iptables_command_state, + .clear_cs = xtables_clear_iptables_command_state, .xlate = nft_ipv4_xlate, .add_entry = nft_ipv4_add_entry, .delete_entry = nft_ipv4_delete_entry, |