summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYuxiang Zhu <vfreex@gmail.com>2022-11-21 01:02:54 +0800
committerYuxiang Zhu <vfreex@gmail.com>2022-11-21 15:49:28 +0800
commit407d469be919f1841fb3bac49947c758c4a24b67 (patch)
tree0d91138f4e594fd45830776c2ce089c373838419 /data
parent6d90375db4dd0c9beb2815e8ceae2d6214465f99 (diff)
downloadvyos-1x-407d469be919f1841fb3bac49947c758c4a24b67.tar.gz
vyos-1x-407d469be919f1841fb3bac49947c758c4a24b67.zip
T4832: dhcp: Add dhcp option to signal IPv6-only support
Clients supporting this DHCP option (DHCP option 108, per RFC 8925) will disable its IPv4 network stack for configured number of seconds and operate in IPv6-only mode. Example clients supporting this option including iOS 15+ and macOS 12.0.1+.
Diffstat (limited to 'data')
-rw-r--r--data/templates/dhcp-server/dhcpd.conf.tmpl7
1 files changed, 7 insertions, 0 deletions
diff --git a/data/templates/dhcp-server/dhcpd.conf.tmpl b/data/templates/dhcp-server/dhcpd.conf.tmpl
index 0f0c622d4..13272ade3 100644
--- a/data/templates/dhcp-server/dhcpd.conf.tmpl
+++ b/data/templates/dhcp-server/dhcpd.conf.tmpl
@@ -22,6 +22,7 @@ ddns-update-style {{ 'interim' if dynamic_dns_update is defined else 'none' }};
option rfc3442-static-route code 121 = array of integer 8;
option windows-static-route code 249 = array of integer 8;
option wpad-url code 252 = text;
+option rfc8925-ipv6-only-preferred code 108 = unsigned integer 32;
{% if global_parameters is defined and global_parameters is not none %}
# The following {{ global_parameters | length }} line(s) have been added as
@@ -78,6 +79,9 @@ shared-network {{ network }} {
{% if network_config.ntp_server is defined and network_config.ntp_server is not none %}
option ntp-servers {{ network_config.ntp_server | join(', ') }};
{% endif %}
+{% if network_config.ntp_server is defined and network_config.ntp_server is not none %}
+ option ntp-servers {{ network_config.ntp_server | join(', ') }};
+{% endif %}
{% if network_config.ping_check is defined %}
ping-check true;
{% endif %}
@@ -118,6 +122,9 @@ shared-network {{ network }} {
{% if subnet_config.wins_server is defined and subnet_config.wins_server is not none %}
option netbios-name-servers {{ subnet_config.wins_server | join(', ') }};
{% endif %}
+{% if subnet_config.ipv6_only_preferred is defined and subnet_config.ipv6_only_preferred is not none %}
+ option rfc8925-ipv6-only-preferred {{ subnet_config.ipv6_only_preferred }};
+{% endif %}
{% if subnet_config.static_route is defined and subnet_config.static_route is not none %}
{% set static_default_route = '' %}
{% if subnet_config.default_router and subnet_config.default_router is not none %}