summaryrefslogtreecommitdiff
path: root/src/conf_mode/vpn_ipsec.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-03 00:01:13 +0200
committerChristian Breunig <christian@breunig.cc>2024-04-03 00:01:13 +0200
commit4c7c168fe970b807750a05ceb66b70c0d8652535 (patch)
tree945345f3f465d9647d10f7fde742756d2c77e435 /src/conf_mode/vpn_ipsec.py
parent86b632874288aa5707a94a4f28ca816e543823b9 (diff)
downloadvyos-1x-4c7c168fe970b807750a05ceb66b70c0d8652535.tar.gz
vyos-1x-4c7c168fe970b807750a05ceb66b70c0d8652535.zip
T6199: replace netifaces.interfaces() with common custom helpers
* Use interface_exists() outside of verify() * Use verify_interface_exists() in verify() to drop common error message
Diffstat (limited to 'src/conf_mode/vpn_ipsec.py')
-rwxr-xr-xsrc/conf_mode/vpn_ipsec.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/conf_mode/vpn_ipsec.py b/src/conf_mode/vpn_ipsec.py
index 0c2f232df..d07aca979 100755
--- a/src/conf_mode/vpn_ipsec.py
+++ b/src/conf_mode/vpn_ipsec.py
@@ -168,9 +168,7 @@ def verify(ipsec):
for interface in ipsec['interface']:
# exclude check interface for dynamic interfaces
if tmp.match(interface):
- if not interface_exists(interface):
- Warning(f'Interface "{interface}" does not exist yet and cannot be used '
- f'for IPsec until it is up!')
+ verify_interface_exists(interface, warning_only=True)
else:
verify_interface_exists(interface)