summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhramshinr <khramshinr@gmail.com>2025-01-13 22:27:26 +0800
committerkhramshinr <khramshinr@gmail.com>2025-01-13 22:27:26 +0800
commit0d285732030c9bd64ef016adb7b325feed1cd880 (patch)
treee92edb9458ea2ae134fb3acf919c9e3facd5b6f3
parent8a83a976b775d4f24138ee5fff8dcb602789904d (diff)
downloadvyos-1x-0d285732030c9bd64ef016adb7b325feed1cd880.tar.gz
vyos-1x-0d285732030c9bd64ef016adb7b325feed1cd880.zip
T681: Fix QoS DSCP filter
The left shift operation aligns the DSCP/TOS value with its bit position in the IP header. TC expects a DSCP value with this shift
-rw-r--r--python/vyos/qos/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/qos/base.py b/python/vyos/qos/base.py
index 66df5d107..b477b5b5e 100644
--- a/python/vyos/qos/base.py
+++ b/python/vyos/qos/base.py
@@ -89,7 +89,8 @@ class QoSBase:
if value in self._dsfields:
return self._dsfields[value]
else:
- return value
+ # left shift operation aligns the DSCP/TOS value with its bit position in the IP header.
+ return int(value) << 2
def _calc_random_detect_queue_params(self, avg_pkt, max_thr, limit=None, min_thr=None,
mark_probability=None, precedence=0):