summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-11-25 14:59:39 -0200
committerRenato Botelho <renato@netgate.com>2016-11-25 14:59:39 -0200
commitab97c6aab12016120e3e0f33ac588a11d33edfa9 (patch)
treee094f8e9c1c5cc0190d0deb46db15224a64cbed6
parent8adb194651e6a0f2a0c9d095b3c7062bb03d95f4 (diff)
parent7164c563c54f2548a298eb90e3720aa1def8b1b7 (diff)
downloadpfsense-ab97c6aab12016120e3e0f33ac588a11d33edfa9.zip
pfsense-ab97c6aab12016120e3e0f33ac588a11d33edfa9.tar.gz
Merge pull request #3230 from phil-davis/patch-7
-rw-r--r--src/usr/local/www/services_dhcp_edit.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php
index 097a660..abcc192 100644
--- a/src/usr/local/www/services_dhcp_edit.php
+++ b/src/usr/local/www/services_dhcp_edit.php
@@ -173,8 +173,8 @@ if ($_POST) {
}
}
- if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) {
- $input_errors[] = gettext("A valid IP address must be specified.");
+ if (($_POST['ipaddr'] && !is_ipaddrv4($_POST['ipaddr']))) {
+ $input_errors[] = gettext("A valid IPv4 address must be specified.");
}
if (($_POST['mac'] && !is_macaddr($_POST['mac']))) {
@@ -232,10 +232,10 @@ if ($_POST) {
}
if (($_POST['gateway'] && !is_ipaddrv4($_POST['gateway']))) {
- $input_errors[] = gettext("A valid IP address must be specified for the gateway.");
+ $input_errors[] = gettext("A valid IPv4 address must be specified for the gateway.");
}
if (($_POST['wins1'] && !is_ipaddrv4($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddrv4($_POST['wins2']))) {
- $input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers.");
+ $input_errors[] = gettext("A valid IPv4 address must be specified for the primary/secondary WINS servers.");
}
$parent_ip = get_interface_ip($POST['if']);
@@ -249,7 +249,7 @@ if ($_POST) {
($_POST['dns2'] && !is_ipaddrv4($_POST['dns2'])) ||
($_POST['dns3'] && !is_ipaddrv4($_POST['dns3'])) ||
($_POST['dns4'] && !is_ipaddrv4($_POST['dns4']))) {
- $input_errors[] = gettext("A valid IP address must be specified for each of the DNS servers.");
+ $input_errors[] = gettext("A valid IPV4 address must be specified for each of the DNS servers.");
}
if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60))) {
@@ -262,7 +262,7 @@ if ($_POST) {
$input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
}
if (($_POST['ddnsdomain'] && !is_ipaddrv4($_POST['ddnsdomainprimary']))) {
- $input_errors[] = gettext("A valid primary domain name server IP address must be specified for the dynamic domain name.");
+ $input_errors[] = gettext("A valid primary domain name server IPv4 address must be specified for the dynamic domain name.");
}
if (($_POST['ddnsdomainkey'] && !$_POST['ddnsdomainkeyname']) ||
($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) {
@@ -279,13 +279,13 @@ if ($_POST) {
}
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.");
+ $input_errors[] = gettext("A valid IPv4 address must be specified for the primary/secondary NTP servers.");
}
if ($_POST['tftp'] && !is_ipaddrv4($_POST['tftp']) && !is_domain($_POST['tftp']) && !filter_var($_POST['tftp'], FILTER_VALIDATE_URL)) {
- $input_errors[] = gettext("A valid IP address, hostname or URL must be specified for the TFTP server.");
+ $input_errors[] = gettext("A valid IPv4 address, hostname or URL must be specified for the TFTP server.");
}
if (($_POST['nextserver'] && !is_ipaddrv4($_POST['nextserver']))) {
- $input_errors[] = gettext("A valid IP address must be specified for the network boot server.");
+ $input_errors[] = gettext("A valid IPv4 address must be specified for the network boot server.");
}
if (!$input_errors) {
@@ -431,7 +431,8 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_IpAddress(
'ipaddr',
'IP Address',
- $pconfig['ipaddr']
+ $pconfig['ipaddr'],
+ 'V4'
))->setHelp('If an IPv4 address is entered, the address must be outside of the pool.' . '<br />' .
'If no IPv4 address is given, one will be dynamically allocated from the pool.');
@@ -595,7 +596,8 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_IpAddress(
'ddnsdomainprimary',
'DDNS Server IP',
- $pconfig['ddnsdomainprimary']
+ $pconfig['ddnsdomainprimary'],
+ 'V4'
))->setHelp('Enter the primary domain name server IP address for the dynamic domain name.');
$section->addInput(new Form_Input(
OpenPOWER on IntegriCloud