Skip to content

Commit

Permalink
T681: Fix QoS DSCP filter
Browse files Browse the repository at this point in the history
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
  • Loading branch information
HollyGurza committed Jan 13, 2025
1 parent 8a83a97 commit 0d28573
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/vyos/qos/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def _get_dsfield(self, value):
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):
Expand Down

0 comments on commit 0d28573

Please sign in to comment.