From 1866625f0befbc04673017692813f48d084004ff Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 19 Jul 2018 18:31:57 +0200 Subject: xtables: introduce rule_to_cs/clear_cs callbacks This introduces callbacks in nft_family_ops for parsing an nftnl rule into iptables_command_state and clearing it afterwards. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/nft-bridge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'iptables/nft-bridge.c') diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index 4b3c163b..3834d6dd 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -347,7 +347,7 @@ static void nft_bridge_parse_target(struct xtables_target *t, void *data) cs->target = t; } -static void nft_rule_to_ebtables_command_state(struct nftnl_rule *r, +static void nft_rule_to_ebtables_command_state(const struct nftnl_rule *r, struct iptables_command_state *cs) { cs->eb.bitmask = EBT_NOPROTO; @@ -733,6 +733,8 @@ struct nft_family_ops nft_family_ops_bridge = { .save_firewall = NULL, .save_counters = NULL, .post_parse = NULL, + .rule_to_cs = nft_rule_to_ebtables_command_state, + .clear_cs = ebt_cs_clean, .rule_find = nft_bridge_rule_find, .xlate = nft_bridge_xlate, }; -- cgit v1.2.3