summaryrefslogtreecommitdiff
path: root/src/conf_mode/dns_forwarding.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-24 19:10:40 +0200
committerDaniil Baturin <daniil@baturin.org>2018-05-24 19:10:40 +0200
commit374ebb0e69ecd9eef9c10e23a6f950c188e81e15 (patch)
tree34291170d2a0a2bfac76e8c107db99541eb40702 /src/conf_mode/dns_forwarding.py
parentdb20a46910baafff9391c8f717cbcd69f1cb601c (diff)
downloadvyos-1x-374ebb0e69ecd9eef9c10e23a6f950c188e81e15.tar.gz
vyos-1x-374ebb0e69ecd9eef9c10e23a6f950c188e81e15.zip
T128: make nonexistent listen-on interface in DNS forwarding a warning rather than an error.
Diffstat (limited to 'src/conf_mode/dns_forwarding.py')
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index 391dc14ea..1283d68b0 100755
--- a/src/conf_mode/dns_forwarding.py
+++ b/src/conf_mode/dns_forwarding.py
@@ -156,8 +156,9 @@ def get_config():
try:
addrs = netifaces.ifaddresses(interface)
except ValueError:
- raise ConfigError("Invalid interface: {0}".format(interface))
-
+ print("WARNING: interface {0} does not exist".format(interface))
+ continue
+
if netifaces.AF_INET in addrs.keys():
for ip4 in addrs[netifaces.AF_INET]:
listen4.append(ip4['addr'])