From 0d285732030c9bd64ef016adb7b325feed1cd880 Mon Sep 17 00:00:00 2001 From: khramshinr Date: Mon, 13 Jan 2025 22:27:26 +0800 Subject: 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 --- python/vyos/qos/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- cgit v1.2.3