summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-10-17 20:55:01 +0200
committerChristian Breunig <christian@breunig.cc>2026-10-17 20:56:32 +0200
commite71bb87517cec1818714f4dd7199a524494c1949 (patch)
tree4800ae4cdced47758d63268dae7eb2bc21b6838b /python
parent272b6e646d64651af0b5e8e726021e4fb09cd872 (diff)
downloadvyos-1x-e71bb87517cec1818714f4dd7199a524494c1949.tar.gz
vyos-1x-e71bb87517cec1818714f4dd7199a524494c1949.zip
wlb: T9472: honour per-packet-balancing on rules
The renderer checked a key no CLI node produces, so "per-packet-balancing" had no effect and every rule balanced per flow only. With the option set, the rule no longer matches new connections only and every packet is balanced on its own.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/wanloadbalance.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/wanloadbalance.py b/python/vyos/wanloadbalance.py
index 1dc9a8081..fc9fb1ade 100644
--- a/python/vyos/wanloadbalance.py
+++ b/python/vyos/wanloadbalance.py
@@ -112,7 +112,8 @@ def nft_rule(rule_conf, rule_id, local=False, exclude=False, limit=False, weight
output.append(f'{proto} {prefix}port {operator} @P_{group_name}')
- if 'source_based_routing' not in rule_conf and not restore_mark:
+ # per flow by default - only the first packet of a connection is balanced
+ if 'per_packet_balancing' not in rule_conf and not restore_mark:
output.append('ct state new')
if limit and 'limit' in rule_conf and 'rate' in rule_conf['limit']: