summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/local/www/services_dhcp_relay.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/usr/local/www/services_dhcp_relay.php b/src/usr/local/www/services_dhcp_relay.php
index e57da84..e824b44 100644
--- a/src/usr/local/www/services_dhcp_relay.php
+++ b/src/usr/local/www/services_dhcp_relay.php
@@ -84,8 +84,8 @@ if ($_POST) {
if ($_POST['server']) {
foreach ($_POST['server'] as $checksrv => $srv) {
if (!empty($srv[0])) { // Filter out any empties
- if (!is_ipaddr($srv[0])) {
- $input_errors[] = sprintf(gettext("Destination Server IP address %s is not a valid IP address."), $srv[0]);
+ if (!is_ipaddrv4($srv[0])) {
+ $input_errors[] = sprintf(gettext("Destination Server IP address %s is not a valid IPv4 address."), $srv[0]);
}
if (!empty($svrlist)) {
@@ -175,9 +175,10 @@ function createDestinationServerInputGroup($value = null) {
$group->add(new Form_IpAddress(
'server',
'Destination server',
- $value
+ $value,
+ 'V4'
))->setWidth(4)
- ->setHelp('This is the IP address of the server to which DHCP requests are relayed.')
+ ->setHelp('This is the IPv4 address of the server to which DHCP requests are relayed.')
->setIsRepeated();
$group->enableDuplication(null, true); // Buttons are in-line with the input
OpenPOWER on IntegriCloud