Don't force IPv6 if IPv6 name servers

Just because we may have found IPv6 DNS servers from /etc/resolv.conf
doesn't mean we should force IPv6 support.

Instead we should disable the IPv6 DNS servers if IPv6 is disabled.

Note: this will also result in any IPv6 servers specified on the command
line being silently ignored too.

Specifying an IPv6 subnet will still require IPv6 support.

Closes #74
This commit is contained in:
Brian May 2016-03-08 18:44:43 +11:00
parent 9e3f02c199
commit 2b0d0065c7

View File

@ -547,11 +547,15 @@ def main(listenip_v6, listenip_v4,
else:
listenip_v6 = None
required.ipv6 = len(subnets_v6) > 0 or len(nslist_v6) > 0 \
or listenip_v6 is not None
required.ipv6 = len(subnets_v6) > 0 or listenip_v6 is not None
required.udp = avail.udp
required.dns = len(nslist) > 0
# if IPv6 not supported, ignore IPv6 DNS servers
if not required.ipv6:
nslist_v6 = []
nslist = nslist_v4
fw.method.assert_features(required)
if required.ipv6 and listenip_v6 is None: