diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-03 19:23:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 19:23:14 +0200 |
commit | d4b53a38359d80a4578d6fb2d8c76241b310f866 (patch) | |
tree | 72d8b52266a25c26132c615b64adfa8b3345ff7c /src/conf_mode/interfaces_openvpn.py | |
parent | fe09b767cfae7879dcbb8b2cfd52644342776b7e (diff) | |
parent | 74198e68a6edbdb36a6103a7666de530bdd71696 (diff) | |
download | vyos-1x-d4b53a38359d80a4578d6fb2d8c76241b310f866.tar.gz vyos-1x-d4b53a38359d80a4578d6fb2d8c76241b310f866.zip |
Merge pull request #3240 from c-po/spring-cleaning
T6199: spring cleaning - drop unused Python imports
Diffstat (limited to 'src/conf_mode/interfaces_openvpn.py')
-rwxr-xr-x | src/conf_mode/interfaces_openvpn.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/conf_mode/interfaces_openvpn.py b/src/conf_mode/interfaces_openvpn.py index 45569dd21..505ec55c6 100755 --- a/src/conf_mode/interfaces_openvpn.py +++ b/src/conf_mode/interfaces_openvpn.py @@ -16,7 +16,6 @@ import os import re -import tempfile from cryptography.hazmat.primitives.asymmetric import ec from glob import glob @@ -26,7 +25,6 @@ from ipaddress import IPv4Network from ipaddress import IPv6Address from ipaddress import IPv6Network from ipaddress import summarize_address_range -from netifaces import interfaces from secrets import SystemRandom from shutil import rmtree @@ -63,6 +61,7 @@ from vyos.utils.process import call from vyos.utils.permission import chown from vyos.utils.process import cmd from vyos.utils.network import is_addr_assigned +from vyos.utils.network import interface_exists from vyos import ConfigError from vyos import airbag @@ -683,7 +682,7 @@ def apply(openvpn): if os.path.isfile(cleanup_file): os.unlink(cleanup_file) - if interface in interfaces(): + if interface_exists(interface): VTunIf(interface).remove() # dynamically load/unload DCO Kernel extension if requested |