summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--talpid-core/src/firewall/linux.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/talpid-core/src/firewall/linux.rs b/talpid-core/src/firewall/linux.rs
index 8fc47040bb..95e7f5e46b 100644
--- a/talpid-core/src/firewall/linux.rs
+++ b/talpid-core/src/firewall/linux.rs
@@ -412,6 +412,9 @@ impl<'a> PolicyBatch<'a> {
prerouting_rule.add_expr(&nft_expr!(cmp == split_tunnel::MARK));
prerouting_rule.add_expr(&nft_expr!(immediate data crate::linux::TUNNEL_FW_MARK));
prerouting_rule.add_expr(&nft_expr!(meta mark set));
+ if *ADD_COUNTERS {
+ prerouting_rule.add_expr(&nft_expr!(counter));
+ }
self.batch.add(&prerouting_rule, nftnl::MsgType::Add);
}
@@ -635,6 +638,10 @@ impl<'a> PolicyBatch<'a> {
prerouting_rule.add_expr(&nft_expr!(immediate data crate::linux::TUNNEL_FW_MARK));
prerouting_rule.add_expr(&nft_expr!(meta mark set));
+ if *ADD_COUNTERS {
+ prerouting_rule.add_expr(&nft_expr!(counter));
+ }
+
self.batch.add(&prerouting_rule, nftnl::MsgType::Add);
let mut in_rule = Rule::new(&self.in_chain);