diff options
-rw-r--r-- | etc/inc/services.inc | 20 | ||||
-rw-r--r-- | usr/local/www/services_dhcpv6.php | 8 |
2 files changed, 11 insertions, 17 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 750c884..ee09afe 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -872,11 +872,6 @@ EOPP; if (isset($dhcpv6ifconf['denyunknown'])) $dhcpdv6conf .= " deny unknown-clients;\n"; - if ($dhcpv6ifconf['gateway']) - $routersv6 = $dhcpv6ifconf['gateway']; - else - $routersv6 = $ifcfgipv6; - if($dhcpv6ifconf['failover_peerip'] <> "") { $dhcpdv6conf .= " failover peer \"dhcpv6{$dhcpv6num}\";\n"; $dhcpv6num++; @@ -884,7 +879,6 @@ EOPP; $dhcpdv6conf .= <<<EOD range6 {$dhcpv6ifconf['range']['from']} {$dhcpv6ifconf['range']['to']}; - # Not supported in IPv6; option dhcp6.routers {$routersv6}; $dnscfgv6 EOD; @@ -902,11 +896,15 @@ EOD; $dhcpdv6conf .= " max-lease-time {$dhcpv6ifconf['maxleasetime']};\n"; // ntp-servers - /* Not supported in ISC DHCPD yet, see redmine #2016 - if (is_array($dhcpv6ifconf['ntpserver']) && $dhcpv6ifconf['ntpserver'][0]) - $dhcpdv6conf .= " option ntp-servers " . join(",", $dhcpv6ifconf['ntpserver']) . ";\n"; - */ - + if (is_array($dhcpv6ifconf['ntpserver']) && $dhcpv6ifconf['ntpserver'][0]) { + $ntpservers = array(); + foreach($dhcpv6ifconf['ntpserver'] as $ntpserver) { + if(is_ipaddrv6($ntpserver)) + $ntpservers[] = $ntpserver; + } + if(count($ntpservers) > 0 ) + $dhcpdv6conf .= " option dhcp6.sntp-servers " . join(",", $dhcpv6ifconf['ntpserver']) . ";\n"; + } // tftp-server-name /* Needs ISC DHCPD support if ($dhcpv6ifconf['tftp'] <> "") diff --git a/usr/local/www/services_dhcpv6.php b/usr/local/www/services_dhcpv6.php index 6a5276c..664652e 100644 --- a/usr/local/www/services_dhcpv6.php +++ b/usr/local/www/services_dhcpv6.php @@ -409,8 +409,8 @@ include("head.inc"); document.iform.domainsearchlist.disabled = endis; document.iform.ddnsdomain.disabled = endis; document.iform.ddnsupdate.disabled = endis; - //document.iform.ntp1.disabled = endis; - //document.iform.ntp2.disabled = endis; + document.iform.ntp1.disabled = endis; + document.iform.ntp2.disabled = endis; //document.iform.tftp.disabled = endis; document.iform.ldap.disabled = endis; document.iform.netboot.disabled = endis; @@ -431,13 +431,11 @@ include("head.inc"); aodiv = document.getElementById('showddns'); aodiv.style.display = "block"; } - /* function show_ntp_config() { document.getElementById("showntpbox").innerHTML=''; aodiv = document.getElementById('showntp'); aodiv.style.display = "block"; } - */ /* function show_tftp_config() { document.getElementById("showtftpbox").innerHTML=''; @@ -702,7 +700,6 @@ include("head.inc"); </div> </td> </tr> - <!-- ISC dhcpd does not support ntp for ipv6 yet. See redmine #2016 <tr> <td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td> <td width="78%" class="vtable"> @@ -715,7 +712,6 @@ include("head.inc"); </div> </td> </tr> - --> <!-- ISC dhcpd does not support tftp for ipv6 yet. See redmine #2016 <tr> <td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td> |