summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott Kuhl <kuhl@mtu.edu>2020-11-03 20:27:57 -0500
committerScott Kuhl <kuhl@mtu.edu>2020-11-03 20:27:57 -0500
commit8461e08bc3db2170a28cab33e2af1cb08f321cb0 (patch)
tree3e2ea29d0719f0432e8467f67ef818bd0fdfc8b1 /tests
parent502960d7967f39c6e21617e725960aebf890dbb6 (diff)
Make server and client handle resolv.conf differently.
The server should just read from resolv.conf to find DNS servers to use. This restores this behavior after the previous commit changed it. The client now reads both /etc/resolv.conf and /run/systemd/resolve/resolv.conf. The latter is required to more reliably intercept regular DNS requests that systemd-resolved makes.
Diffstat (limited to 'tests')
-rw-r--r--tests/client/test_helpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/client/test_helpers.py b/tests/client/test_helpers.py
index 3ed588f..732f38a 100644
--- a/tests/client/test_helpers.py
+++ b/tests/client/test_helpers.py
@@ -131,7 +131,7 @@ nameserver 2404:6800:4004:80c::3
nameserver 2404:6800:4004:80c::4
""")
- ns = sshuttle.helpers.resolvconf_nameservers()
+ ns = sshuttle.helpers.resolvconf_nameservers(False)
assert ns == [
(AF_INET, u'192.168.1.1'), (AF_INET, u'192.168.2.1'),
(AF_INET, u'192.168.3.1'), (AF_INET, u'192.168.4.1'),
@@ -156,7 +156,7 @@ nameserver 2404:6800:4004:80c::2
nameserver 2404:6800:4004:80c::3
nameserver 2404:6800:4004:80c::4
""")
- ns = sshuttle.helpers.resolvconf_random_nameserver()
+ ns = sshuttle.helpers.resolvconf_random_nameserver(False)
assert ns in [
(AF_INET, u'192.168.1.1'), (AF_INET, u'192.168.2.1'),
(AF_INET, u'192.168.3.1'), (AF_INET, u'192.168.4.1'),