From 51a6eaa324775049ee666503ca0a63571750ac25 Mon Sep 17 00:00:00 2001 From: Lucas Christian Date: Sun, 4 Oct 2020 17:50:53 -0500 Subject: dhcpv6: T2961: support stateless dhcpv6 clients This commit adds support for configuring the DHCPv6 server to serve "stateless" DHCPv6 clients (those that send an information-request message and do not request an address). The change introduces a `common-options` node at the `shared-network-name` level, which allows specifying options applicable to clients regardless of subnet assigned (or in the case of stateless clients, when no subnet is assigned). Parameters specified at the subnet level take precedence over those set at the shared-network level. Presently, only parameters that are meaningful to stateless clients have been exposed under `common-options`, as there is no precedent of exposing parameters at multiple levels under the current DHCPv4 or DHCPv6 configuration syntax. If desired, additional parameters could certainly be added with relative ease. --- data/templates/dhcpv6-server/dhcpdv6.conf.tmpl | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'data') diff --git a/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl b/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl index ff7822b0d..bdeea71da 100644 --- a/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl +++ b/data/templates/dhcpv6-server/dhcpdv6.conf.tmpl @@ -12,6 +12,15 @@ option dhcp6.preference {{ preference }}; {% for network in shared_network %} {%- if not network.disabled -%} shared-network {{ network.name }} { + {%- if network.common.info_refresh_time %} + option dhcp6.info-refresh-time {{ network.common.info_refresh_time }}; + {%- endif %} + {%- if network.common.domain_search %} + option dhcp6.domain-search "{{ network.common.domain_search | join('", "') }}"; + {%- endif %} + {%- if network.common.dns_server %} + option dhcp6.name-servers {{ network.common.dns_server | join(', ') }}; + {%- endif %} {%- for subnet in network.subnet %} subnet6 {{ subnet.network }} { {%- for range in subnet.range6_prefix %} -- cgit v1.2.3