From fe97f60e5d2a968638286036db67e3a4e17f095d Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Mon, 9 Feb 2015 13:16:12 +0100 Subject: ebtables-compat: add watchers support ebtables watchers are targets which always return EBT_CONTINUE. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- iptables/nft-bridge.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'iptables/nft-bridge.h') diff --git a/iptables/nft-bridge.h b/iptables/nft-bridge.h index cd63c11a..1c4a96ea 100644 --- a/iptables/nft-bridge.h +++ b/iptables/nft-bridge.h @@ -93,10 +93,21 @@ struct ebt_entry { unsigned char out_mask[IFNAMSIZ]; }; +/* trick for ebtables-compat, since watchers are targets */ +struct ebt_match { + struct ebt_match *next; + union { + struct xtables_match *match; + struct xtables_target *watcher; + } u; + bool ismatch; +}; + struct ebtables_command_state { struct ebt_entry fw; struct xtables_target *target; struct xtables_rule_match *matches; + struct ebt_match *match_list; const char *jumpto; struct xt_counters counters; int invert; @@ -155,4 +166,6 @@ static inline const char *ebt_target_name(unsigned int verdict) *flags |= mask; \ }) \ +void ebt_cs_clean(struct ebtables_command_state *cs); + #endif -- cgit v1.2.3