summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2015-01-19 14:27:57 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-01-28 17:23:51 +0100
commitcd414abfd21dae0288f53669672f057c0630c78a (patch)
tree1c163eb666c006620f257e3f4cba02da73d15c97
parentc5c011a13395ceab661eb2d5774487e1215ca9e7 (diff)
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 <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--iptables/nft-bridge.c3
1 files changed, 3 insertions, 0 deletions
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);
}