From 820ea3e1bc9f3784d02b1f93f91f1fa6c3d6c050 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 11 Aug 2026 14:40:07 +0100 Subject: [PATCH] dhcpd: Use RFC6842, limit NTP server responses --- cookbooks/dhcpd/templates/default/dhcpd.conf.erb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cookbooks/dhcpd/templates/default/dhcpd.conf.erb b/cookbooks/dhcpd/templates/default/dhcpd.conf.erb index be7172931..cc8f29b89 100644 --- a/cookbooks/dhcpd/templates/default/dhcpd.conf.erb +++ b/cookbooks/dhcpd/templates/default/dhcpd.conf.erb @@ -1,12 +1,8 @@ # DO NOT EDIT - This file is being maintained by Chef -option arch code 93 = unsigned integer 16; -# ilo5 expects TZ data per rfc4833 -option PCode code 100 = text; -option TCode code 101 = text; - default-lease-time 600; max-lease-time 7200; +echo-client-id on; <% node.ipaddresses(:role => :internal, :family => :inet).each do |address| -%> subnet <%= address.network %> netmask <%= address.netmask %> { @@ -15,7 +11,7 @@ subnet <%= address.network %> netmask <%= address.netmask %> { option routers <%= address.gateway %>; option domain-name "<%= @domain %>"; option domain-name-servers <%= address.gateway %>; - option ntp-servers <%= node[:ntp][:servers].join(", ") %>; + option ntp-servers <%= node[:ntp][:servers].first %>; option time-offset 0; option PCode "UTC0"; @@ -26,10 +22,10 @@ subnet <%= address.network %> netmask <%= address.netmask %> { # See https://netboot.xyz/docs/docker/#dhcp-configurations if exists user-class and ( option user-class = "iPXE" ) { filename "http://boot.netboot.xyz/menu.ipxe"; - } elsif option arch = encode-int ( 16, 16 ) { + } elsif option pxe-system-type = encode-int ( 16, 16 ) { filename "http://boot.netboot.xyz/ipxe/netboot.xyz.efi"; option vendor-class-identifier "HTTPClient"; - } elsif option arch = 00:07 { + } elsif option pxe-system-type = 00:07 { filename "netboot.xyz.efi"; } else { filename "netboot.xyz.kpxe"; -- 2.47.3