From 80561b972db77b109397b6b17f5d4ae7bf8762bf Mon Sep 17 00:00:00 2001 From: Marcin Osypka Date: Wed, 17 Jan 2024 19:33:04 +0100 Subject: [PATCH] Add Elem counter field Since nftables 0.9.5 there is a counter per element available --- src/expr.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/expr.rs b/src/expr.rs index 5640e4d..c6895ef 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -2,6 +2,7 @@ use serde::{Deserialize, Serialize}; use std::collections::HashSet; use crate::stmt::Statement; +use crate::stmt::Counter; #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] #[serde(untagged)] @@ -358,6 +359,7 @@ pub struct Elem { pub timeout: u32, pub expires: u32, pub comment: String, + pub counter: Option, } #[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]