From: Roy Marples Date: Wed, 5 Jun 2013 20:48:09 +0000 (+0000) Subject: Add support for NTP servers, RFC 4075 X-Git-Tag: v6.0.0~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95b7b9040e8acbb1241f68d0b99e7672805aed61;p=thirdparty%2Fdhcpcd.git Add support for NTP servers, RFC 4075 --- diff --git a/dhcp6.c b/dhcp6.c index 0b8edab5..9d4d8285 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -140,6 +140,7 @@ const struct dhcp_compat dhcp_compats[] = { { DHO_HOSTNAME, D6_OPTION_FQDN }, { DHO_DNSDOMAIN, D6_OPTION_FQDN }, { DHO_NISSERVER, D6_OPTION_NIS_SERVERS }, + { DHO_NTPSERVER, D6_OPTION_SNTP_SERVERS }, { DHO_FQDN, D6_OPTION_FQDN }, { DHO_DNSSEARCH, D6_OPTION_DOMAIN_LIST }, { 0, 0 } diff --git a/dhcpcd-hooks/50-ntp.conf b/dhcpcd-hooks/50-ntp.conf index adbe6202..c0781360 100644 --- a/dhcpcd-hooks/50-ntp.conf +++ b/dhcpcd-hooks/50-ntp.conf @@ -95,6 +95,13 @@ remove_ntp_conf() build_ntp_conf } +# For ease of use, map DHCP6 names onto our DHCP4 names +case "$reason" in +BOUND6|RENEW6|REBIND6|REBOOT6|INFORM6) + new_ntp_servers="$new_dhcp6_sntp_servers" +;; +esac + if $if_up; then add_ntp_conf add elif $if_down; then diff --git a/dhcpcd.8.in b/dhcpcd.8.in index 0a181b71..1dc79399 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -604,8 +604,8 @@ running on the .Xr resolvconf 8 .Sh STANDARDS RFC 951, RFC 1534, RFC 2131, RFC 2132, RFC 2855, RFC 3004, RFC 3315,RFC 3361, -RFC 3633, RFC 3396, RFC 3397, RFC 3442, RFC 3927, RFC 4361, RFC 4390, RFC 4702, -RFC 4704, RFC 4861, RFC 4833, RFC 5227, RFC 5969, RFC 6106. +RFC 3633, RFC 3396, RFC 3397, RFC 3442, RFC 3927, RFC 4075, RFC 4361, RFC 4390, +RFC 4702, RFC 4704, RFC 4861, RFC 4833, RFC 5227, RFC 5969, RFC 6106. .Sh AUTHORS .An Roy Marples Aq roy@marples.name .Sh BUGS