From db494f512ae62eab3d90b786da5f8d855b45ec7d Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 17 Oct 2026 20:55:12 +0200 Subject: wlb: T9472: honour limit threshold "above" on rules "limit threshold above" was ignored. The rule always matched the traffic below the rate, the same as the default "below". With "above" the rule now matches the traffic exceeding the rate. --- python/vyos/wanloadbalance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/wanloadbalance.py b/python/vyos/wanloadbalance.py index fc9fb1ade..a8cd87350 100644 --- a/python/vyos/wanloadbalance.py +++ b/python/vyos/wanloadbalance.py @@ -117,7 +117,9 @@ def nft_rule(rule_conf, rule_id, local=False, exclude=False, limit=False, weight output.append('ct state new') if limit and 'limit' in rule_conf and 'rate' in rule_conf['limit']: - output.append(f'limit rate {rule_conf["limit"]["rate"]}/{rule_conf["limit"]["period"]}') + # "above" matches the traffic exceeding the rate, "below" the rest + over = 'over ' if rule_conf['limit'].get('threshold') == 'above' else '' + output.append(f'limit rate {over}{rule_conf["limit"]["rate"]}/{rule_conf["limit"]["period"]}') if 'burst' in rule_conf['limit']: output.append(f'burst {rule_conf["limit"]["burst"]} packets') -- cgit v1.2.3