summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-05-21 20:01:18 +0200
committerGitHub <noreply@github.com>2024-05-21 20:01:18 +0200
commit23a420194f4d0eb0177f05bd0a8c60e4f5214e54 (patch)
treec4cb4c8ee970408bd8b521885880245eed9bebbd /python
parent108a42fc013073759c82caf7a6a8c79f417c2c81 (diff)
parente50b7afc9d5b727d04933116ccf364a2b9a48c30 (diff)
downloadvyos-1x-23a420194f4d0eb0177f05bd0a8c60e4f5214e54.tar.gz
vyos-1x-23a420194f4d0eb0177f05bd0a8c60e4f5214e54.zip
Merge pull request #3494 from HollyGurza/T6373
T6373: QoS Policy Limiter - classes for marked traffic do not work
Diffstat (limited to 'python')
-rw-r--r--python/vyos/qos/base.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/python/vyos/qos/base.py b/python/vyos/qos/base.py
index 87927ba9d..98e486e42 100644
--- a/python/vyos/qos/base.py
+++ b/python/vyos/qos/base.py
@@ -247,9 +247,15 @@ class QoSBase:
filter_cmd_base += ' protocol all'
if 'match' in cls_config:
- is_filtered = False
+ has_filter = False
for index, (match, match_config) in enumerate(cls_config['match'].items(), start=1):
filter_cmd = filter_cmd_base
+ if not has_filter:
+ for key in ['mark', 'vif', 'ip', 'ipv6']:
+ if key in match_config:
+ has_filter = True
+ break
+
if self.qostype == 'shaper' and 'prio ' not in filter_cmd:
filter_cmd += f' prio {index}'
if 'mark' in match_config:
@@ -332,13 +338,12 @@ class QoSBase:
cls = int(cls)
filter_cmd += f' flowid {self._parent:x}:{cls:x}'
self._cmd(filter_cmd)
- is_filtered = True
vlan_expression = "match.*.vif"
match_vlan = jmespath.search(vlan_expression, cls_config)
if any(tmp in ['exceed', 'bandwidth', 'burst'] for tmp in cls_config) \
- and is_filtered:
+ and has_filter:
# For "vif" "basic match" is used instead of "action police" T5961
if not match_vlan:
filter_cmd += f' action police'