diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-02-09 10:51:00 +0000 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-09 11:44:35 +0000 |
commit | a6781cd008998200d491fbf86f6976d81323a7bd (patch) | |
tree | cfb7d6fbf300d4d4a95f8f786437845cc0b3271a /src/conf_mode/service_router-advert.py | |
parent | 7e621f09dabb542d11db8931d19f36246763f64c (diff) | |
download | vyos-1x-a6781cd008998200d491fbf86f6976d81323a7bd.tar.gz vyos-1x-a6781cd008998200d491fbf86f6976d81323a7bd.zip |
T6028: Fix QoS policy shaper wrong class_id_max and default_minor_id
The `class_id_max` is wrong due to `tmp.sort` of Strings
If we have class 5 and class 10 we get sorted max value 5, expected 10
```
>>> tmp = ['5', '10']
>>> tmp.sort()
>>> tmp
['10', '5']
>>>
>>> hex(5+1)
'0x6'
>>>
>>> hex(10+1)
'0xb'
>>>
```
This way we get wrong default maximum class value:
```
tc qdisc replace dev eth1 root handle 1: htb r2q 444 default 6
```
Expect:
```
tc qdisc replace dev eth1 root handle 1: htb r2q 444 default b
```
Fix this converting Strings to Integers and get max value.
(cherry picked from commit 2e8fa45c7f0663549edd118622b3381e7c428b2e)
Diffstat (limited to 'src/conf_mode/service_router-advert.py')
0 files changed, 0 insertions, 0 deletions