Skip to content

Commit 24352d8

Browse files
author
starsquid
committed
Ignore IPv6 DNS servers on remote site
When getting list of remote DNS servers, we check /etc/resolv.conf Since we don't support IPv6, ignore any lines that contain ":" in the IP field
1 parent 9ce2fa0 commit 24352d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def resolvconf_nameservers():
4646
l = []
4747
for line in open('/etc/resolv.conf'):
4848
words = line.lower().split()
49-
if len(words) >= 2 and words[0] == 'nameserver':
49+
if len(words) >= 2 and words[0] == 'nameserver' and words[1].find(':') == -1:
5050
l.append(words[1])
5151
return l
5252

0 commit comments

Comments
 (0)