You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: smoketest/scripts/cli/test_load-balancing_wan.py
+22-1Lines changed: 22 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -164,7 +164,7 @@ def test_check_chains(self):
164
164
mangle_prerouting="""table ip vyos_wanloadbalance {
165
165
chain wlb_mangle_prerouting {
166
166
type filter hook prerouting priority mangle; policy accept;
167
-
iifname "veth3" ip saddr 198.51.100.0/24 ct state new limit rate 5/second burst 5 packets counter numgen random mod 11 vmap { 0 : jump wlb_mangle_isp_veth1, 1-10 : jump wlb_mangle_isp_veth2 }
167
+
iifname "veth3" ip saddr 198.51.100.0/24 ct state new counter numgen random mod 11 vmap { 0 : jump wlb_mangle_isp_veth1, 1-10 : jump wlb_mangle_isp_veth2 }
168
168
iifname "veth3" ip saddr 198.51.100.0/24 counter meta mark set ct mark
169
169
}
170
170
}"""
@@ -234,6 +234,27 @@ def test_check_chains(self):
234
234
tmp=cmd('sudo nft -s list chain ip vyos_wanloadbalance wlb_nat_postrouting')
235
235
self.assertEqual(tmp, nat_wanloadbalance)
236
236
237
+
# Set limit configuration
238
+
mangle_prerouting_limit="""table ip vyos_wanloadbalance {
239
+
chain wlb_mangle_prerouting {
240
+
type filter hook prerouting priority mangle; policy accept;
241
+
iifname "veth3" ip saddr 198.51.100.0/24 ct state new limit rate 10/second burst 10 packets counter numgen random mod 11 vmap { 0 : jump wlb_mangle_isp_veth1, 1-10 : jump wlb_mangle_isp_veth2 }
242
+
iifname "veth3" ip saddr 198.51.100.0/24 counter meta mark set ct mark
0 commit comments