summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/services.inc2
-rwxr-xr-xusr/local/www/services_dhcp.php12
2 files changed, 12 insertions, 2 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 6693161..9c5658a 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -499,7 +499,7 @@ EOPP;
}
if($dhcpifconf['domainsearchlist'] <> "") {
- $dnscfg .= " option domain-search-list \"{$dhcpifconf['domainsearchlist']}\";\n";
+ $dnscfg .= " option domain-search \"" . join("\",\"", preg_split("/[ ;]+/", $dhcpifconf['domainsearchlist'])) . "\";\n";
}
if (isset($dhcpifconf['ddnsupdate'])) {
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 77a20e5..a5b9d4e 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -231,6 +231,16 @@ if ($_POST) {
$input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time.");
if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain'])))
$input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
+ if ($_POST['domainsearchlist']) {
+ $domain_array=preg_split("/[ ;]+/",$_POST['domainsearchlist']);
+ foreach ($domain_array as $curdomain) {
+ if (!is_domain($curdomain)) {
+ $input_errors[] = gettext("A valid domain search list must be specified.");
+ break;
+ }
+ }
+ }
+
if (($_POST['ntp1'] && !is_ipaddrv4($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv4($_POST['ntp2'])))
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary NTP servers.");
if (($_POST['domain'] && !is_domain($_POST['domain'])))
@@ -669,7 +679,7 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
<input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
- <?=gettext("The DHCP server can optionally provide a domain search list.");?>
+ <?=gettext("The DHCP server can optionally provide a domain search list. Use the semicolon as seperator ");?>
</td>
</tr>
<tr>
OpenPOWER on IntegriCloud