]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add support for NTP servers, RFC 4075
authorRoy Marples <roy@marples.name>
Wed, 5 Jun 2013 20:48:09 +0000 (20:48 +0000)
committerRoy Marples <roy@marples.name>
Wed, 5 Jun 2013 20:48:09 +0000 (20:48 +0000)
dhcp6.c
dhcpcd-hooks/50-ntp.conf
dhcpcd.8.in

diff --git a/dhcp6.c b/dhcp6.c
index 0b8edab5919e7f8a7e2b7932d89504651c2db9e4..9d4d828559ad50fee05abf1a5af892afa04f9b94 100644 (file)
--- 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 }
index adbe62024b74eb7029eb115fba46e2683b3f0f03..c078136096181de84b630d37283bc5e33748adc4 100644 (file)
@@ -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
index 0a181b71f3a5d5d60f40fb95ddf93d47a05d6890..1dc79399516a2c0d675eabe5bd3fd3b08e2f1d25 100644 (file)
@@ -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