summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_statistic.txlate
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-12-01 11:13:17 +0100
committerFlorian Westphal <fw@strlen.de>2022-12-01 15:18:29 +0100
commit1b1eb7e784a66882d6d4b0440b716b6aba8c99da (patch)
tree81ac8ac0fc1c1bad99914cdcc6d3b12ed2636336 /extensions/libxt_statistic.txlate
parent7f9a0204683f292f05577cd8b4dfc689cdd8e660 (diff)
extensions: add xt_statistics random mode translation
Use meta random and bitops to replicate what xt_statistics is doing. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'extensions/libxt_statistic.txlate')
-rw-r--r--extensions/libxt_statistic.txlate2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/libxt_statistic.txlate b/extensions/libxt_statistic.txlate
index 3196ff20..627120c5 100644
--- a/extensions/libxt_statistic.txlate
+++ b/extensions/libxt_statistic.txlate
@@ -5,4 +5,4 @@ iptables-translate -A OUTPUT -m statistic --mode nth ! --every 10 --packet 5
nft 'add rule ip filter OUTPUT numgen inc mod 10 != 5 counter'
iptables-translate -A OUTPUT -m statistic --mode random --probability 0.1
-nft # -A OUTPUT -m statistic --mode random --probability 0.1
+nft 'add rule ip filter OUTPUT meta random & 2147483647 < 214748365 counter'