autotest: WiFi: Add DNS to IPv6 test
Add RDNSS (name server list) and DNSSL(DNS search list) parameters
to radvd configuration, which allows us to send DNS parameters from
radvd to the client in order to test IPv6-only configurations.
BUG=chromium-os:20219
TEST=Run test -- use instrumented dhcpcd (with IPv6 support) to confirm
both parameters are sent and received successfully by the client.
Change-Id: I3cfc36a97a79bdf7c80ef8486a0d9591e363e910
Reviewed-on: https://gerrit.chromium.org/gerrit/31266
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
diff --git a/server/site_linux_server.py b/server/site_linux_server.py
index 373e3b9..8f57ed1 100644
--- a/server/site_linux_server.py
+++ b/server/site_linux_server.py
@@ -184,13 +184,17 @@
'adv_send_advert': 'on',
'min_adv_interval': '3',
'max_adv_interval': '10',
- # NB: Address below is is within the 2001:0db8/32
+ # NB: Addresses below are within the 2001:0db8/32
# "documentation only" prefix (RFC3849), which is
# guaranteed never to be assigned to a real network.
'prefix': '2001:0db8:0100:f101::/64',
'adv_on_link': 'on',
'adv_autonomous': 'on',
- 'adv_router_addr': 'on' }
+ 'adv_router_addr': 'on',
+ 'rdnss_servers': '2001:0db8:0100:f101::0001 '
+ '2001:0db8:0100:f101::0002',
+ 'adv_rdnss_lifetime': 'infinity',
+ 'dnssl_list': 'a.com b.com' }
radvd_opts.update(params)
config = ('interface %(interface)s {\n'
@@ -202,6 +206,11 @@
' AdvAutonomous %(adv_autonomous)s;\n'
' AdvRouterAddr %(adv_router_addr)s;\n'
' };\n'
+ ' RDNSS %(rdnss_servers)s {\n'
+ ' AdvRDNSSLifetime %(adv_rdnss_lifetime)s;\n'
+ ' };\n'
+ ' DNSSL %(dnssl_list)s {\n'
+ ' };\n'
'};\n') % radvd_opts
cfg_file = params.get('config_file', self.radvd_config['file'])
self.server.run('cat <<EOF >%s\n%s\nEOF\n' % (cfg_file, config))