summaryrefslogtreecommitdiff
path: root/python/vyos/qos
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-06-17 19:34:55 +0200
committerGitHub <noreply@github.com>2023-06-17 19:34:55 +0200
commitfb452c77c689f0f24bf9a98eaf2649beffe1df07 (patch)
tree006ae8879f5dc3e6cf7eb1a9aaaee05d0ddd02c8 /python/vyos/qos
parent49e2822e9775c1c38a067bdc2e92ab5fd69eac95 (diff)
parent7b8ef5d6a24fcdb67c8d138eacbc8d17e5324226 (diff)
downloadvyos-1x-fb452c77c689f0f24bf9a98eaf2649beffe1df07.tar.gz
vyos-1x-fb452c77c689f0f24bf9a98eaf2649beffe1df07.zip
Merge pull request #2047 from sever-sever/T5256
T5256: T5195: Fix QoS match protocol and add vyos.utils.network
Diffstat (limited to 'python/vyos/qos')
-rw-r--r--python/vyos/qos/base.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/vyos/qos/base.py b/python/vyos/qos/base.py
index bd1676107..353eb91b3 100644
--- a/python/vyos/qos/base.py
+++ b/python/vyos/qos/base.py
@@ -20,6 +20,9 @@ from vyos.util import cmd
from vyos.util import dict_search
from vyos.util import read_file
+from vyos.utils.network import get_protocol_by_name
+
+
class QoSBase:
_debug = False
_direction = ['egress']
@@ -197,7 +200,9 @@ class QoSBase:
if tmp: filter_cmd += f' match {tc_af} dport {tmp} 0xffff'
tmp = dict_search(f'{af}.protocol', match_config)
- if tmp: filter_cmd += f' match {tc_af} protocol {tmp} 0xff'
+ if tmp:
+ tmp = get_protocol_by_name(tmp)
+ filter_cmd += f' match {tc_af} protocol {tmp} 0xff'
# Will match against total length of an IPv4 packet and
# payload length of an IPv6 packet.