Skip to content

Commit

Permalink
T5048: QoS index priority should be used only for shaper
Browse files Browse the repository at this point in the history
QoS index priority should be used only for qostype 'shaper'
otherwise we set priority 2 times, that is incorrect.

OSError: [Errno 255] failed to run command:
tc filter add dev eth2 parent 1: prio 5 protocol all prio 1 u32 match ip src 10.1.1.0/24 flowid 1:1e
exit code: 255

Fix it
  • Loading branch information
sever-sever committed Jul 2, 2023
1 parent 9c4c2f4 commit 332f017
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -217,7 +217,8 @@ def update(self, config, direction, priority=None):
if 'match' in cls_config:
for index, (match, match_config) in enumerate(cls_config['match'].items(), start=1):
filter_cmd = filter_cmd_base
filter_cmd += f' prio {index}'
if self.qostype == 'shaper':
filter_cmd += f' prio {index}'
if 'mark' in match_config:
mark = match_config['mark']
filter_cmd += f' handle {mark} fw'
Expand Down
1 change: 1 addition & 0 deletions python/vyos/qos/trafficshaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

class TrafficShaper(QoSBase):
_parent = 1
qostype = 'shaper'

# https://man7.org/linux/man-pages/man8/tc-htb.8.html
def update(self, config, direction):
Expand Down

0 comments on commit 332f017

Please sign in to comment.