summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/configverify.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 4279e6982..7f49aa9af 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -237,8 +237,8 @@ def verify_interface_exists(ifname):
Common helper function used by interface implementations to perform
recurring validation if an interface actually exists.
"""
- from netifaces import interfaces
- if ifname not in interfaces():
+ import os
+ if not os.path.exists(f'/sys/class/net/{ifname}'):
raise ConfigError(f'Interface "{ifname}" does not exist!')
def verify_source_interface(config):