Make dns server work correctly with specified IP
Make portal check work over HTTP
BUG=None
TEST=manual; write a test that creates a DNS server instance that sets local DNS to point back to the device's live eth0 interface, use ping to verify appropriate resolution.
Change-Id: I218900c7dff80ad2d39a33cbf98c4022bebeeb6e
Reviewed-on: http://gerrit.chromium.org/gerrit/5071
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
diff --git a/client/cros/dns_server.py b/client/cros/dns_server.py
index 7deb4ea..4cbbdea 100644
--- a/client/cros/dns_server.py
+++ b/client/cros/dns_server.py
@@ -12,7 +12,7 @@
def __init__(self, fake_ip="127.0.0.1", local_port=53):
import miniFakeDns # So we don't need to install it in the chroot.
- self._dns = miniFakeDns.DNSServer(fake_ip="127.0.0.1", port=local_port)
+ self._dns = miniFakeDns.DNSServer(fake_ip=fake_ip, port=local_port)
self._stopper = threading.Event()
self._thread = threading.Thread(target=self._dns.run,
args=(self._stopper,))