summaryrefslogtreecommitdiff
path: root/src/conf_mode/qos.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-04-03 02:30:00 +0200
committerGitHub <noreply@github.com>2024-04-03 02:30:00 +0200
commitdf2f99f2db19194ece81141c85e6bbb27cbe24ca (patch)
tree50a3f92f2423ec700a1f5fa987c7531847bb591a /src/conf_mode/qos.py
parent516235769726e1e270c6a50523559daad528abac (diff)
parentcc208d74567e44d6cffa4fc9fd58bd9bcf050930 (diff)
downloadvyos-1x-df2f99f2db19194ece81141c85e6bbb27cbe24ca.tar.gz
vyos-1x-df2f99f2db19194ece81141c85e6bbb27cbe24ca.zip
Merge pull request #3235 from vyos/mergify/bp/sagitta/pr-3229
T6192: allow binding SSH to multiple VRF instances (backport #3229)
Diffstat (limited to 'src/conf_mode/qos.py')
-rwxr-xr-xsrc/conf_mode/qos.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/qos.py b/src/conf_mode/qos.py
index 4a0b4d0c5..2b4fcc1bf 100755
--- a/src/conf_mode/qos.py
+++ b/src/conf_mode/qos.py
@@ -36,8 +36,9 @@ from vyos.qos import RateLimiter
from vyos.qos import RoundRobin
from vyos.qos import TrafficShaper
from vyos.qos import TrafficShaperHFSC
-from vyos.utils.process import run
from vyos.utils.dict import dict_search_recursive
+from vyos.utils.network import interface_exists
+from vyos.utils.process import run
from vyos import ConfigError
from vyos import airbag
airbag.enable()
@@ -214,7 +215,7 @@ def apply(qos):
return None
for interface, interface_config in qos['interface'].items():
- if not os.path.exists(f'/sys/class/net/{interface}'):
+ if not interface_exists(interface):
# When shaper is bound to a dialup (e.g. PPPoE) interface it is
# possible that it is yet not availbale when to QoS code runs.
# Skip the configuration and inform the user