diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-03 00:15:43 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-04-03 00:15:43 +0200 |
commit | 274b2da242acd1f1f64ff1dee471e34295137c5f (patch) | |
tree | 664ecd75f20eba0115761967a7728f2ab0c086ae /src/conf_mode/service_dns_forwarding.py | |
parent | 4c7c168fe970b807750a05ceb66b70c0d8652535 (diff) | |
download | vyos-1x-274b2da242acd1f1f64ff1dee471e34295137c5f.tar.gz vyos-1x-274b2da242acd1f1f64ff1dee471e34295137c5f.zip |
T6199: drop unused Python imports
found using "git ls-files *.py | xargs pylint | grep W0611"
Diffstat (limited to 'src/conf_mode/service_dns_forwarding.py')
-rwxr-xr-x | src/conf_mode/service_dns_forwarding.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/conf_mode/service_dns_forwarding.py b/src/conf_mode/service_dns_forwarding.py index ecad765f4..7e863073a 100755 --- a/src/conf_mode/service_dns_forwarding.py +++ b/src/conf_mode/service_dns_forwarding.py @@ -16,7 +16,6 @@ import os -from netifaces import interfaces from sys import exit from glob import glob @@ -24,9 +23,9 @@ from vyos.config import Config from vyos.hostsd_client import Client as hostsd_client from vyos.template import render from vyos.template import bracketize_ipv6 +from vyos.utils.network import interface_exists from vyos.utils.process import call from vyos.utils.permission import chown - from vyos import ConfigError from vyos import airbag airbag.enable() @@ -330,7 +329,7 @@ def apply(dns): # names (DHCP) to use DNS servers. We need to check if the # value is an interface name - only if this is the case, add the # interface based DNS forwarder. - if interface in interfaces(): + if interface_exists(interface): hc.add_name_server_tags_recursor(['dhcp-' + interface, 'dhcpv6-' + interface ]) |