From: Arturo Borrero Date: Mon, 19 Jan 2015 13:27:57 +0000 (+0100) Subject: ebtables-compat: include rule counters in ebtables rules X-Git-Tag: v1.6.0~53^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cd414abfd21dae0288f53669672f057c0630c78a;p=thirdparty%2Fiptables.git ebtables-compat: include rule counters in ebtables rules Counters are missing in ebtables rules. This patch includes them just before the target, so counters are incremented when the rule is about to take his action. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index af67a5af..3ef13570 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -191,6 +191,9 @@ static int nft_bridge_add(struct nft_rule *r, void *data) break; } + if (add_counters(r, cs->counters.pcnt, cs->counters.bcnt) < 0) + return -1; + return _add_action(r, cs); }