mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-22 07:53:43 +01:00
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:
parent
9e3f02c199
commit
2b0d0065c7
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user