summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-03-23 10:35:50 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-03-23 10:35:50 -0300
commita6299fd7c760a30d1c2341cc793c0d7ba48ce498 (patch)
treeff0a3ffdecf686efde764f9b8d56179283f02a76 /usr
parentcd94a9a8d9ea4ba99576da957e18c23472d59f85 (diff)
parent4c6d81ea930f9748ff31f9c6e120988bf521ca53 (diff)
downloadpfsense-a6299fd7c760a30d1c2341cc793c0d7ba48ce498.zip
pfsense-a6299fd7c760a30d1c2341cc793c0d7ba48ce498.tar.gz
Merge pull request #1577 from k-paulius/fix-dhcp6-validation
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/interfaces.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 8ca3247..62cf658 100644
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -576,6 +576,9 @@ if ($_POST['apply']) {
case "dhcp6":
if (in_array($wancfg['ipaddrv6'], array()))
$input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."),$_POST['type6']);
+ if ($_POST['dhcp6-ia-pd-send-hint'] && strtolower($_POST['dhcp6-ia-pd-len']) == 'none') {
+ $input_errors[] = gettext('DHCPv6 Prefix Delegation size must be provided when Send IPv6 prefix hint flag is checked');
+ }
break;
case "6rd":
foreach ($ifdescrs as $ifent => $ifdescr) {
@@ -1154,7 +1157,7 @@ if ($_POST['apply']) {
$wancfg['adv_dhcp6_id_assoc_statement_address_enable'] = $_POST['adv_dhcp6_id_assoc_statement_address_enable'];
if (!empty($_POST['adv_dhcp6_id_assoc_statement_address']))
$wancfg['adv_dhcp6_id_assoc_statement_address'] = $_POST['adv_dhcp6_id_assoc_statement_address'];
- if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_id']))
+ if (is_numericint($_POST['adv_dhcp6_id_assoc_statement_address_id']))
$wancfg['adv_dhcp6_id_assoc_statement_address_id'] = $_POST['adv_dhcp6_id_assoc_statement_address_id'];
if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_pltime']))
$wancfg['adv_dhcp6_id_assoc_statement_address_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_pltime'];
@@ -1165,16 +1168,16 @@ if ($_POST['apply']) {
$wancfg['adv_dhcp6_id_assoc_statement_prefix_enable'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_enable'];
if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix']))
$wancfg['adv_dhcp6_id_assoc_statement_prefix'] = $_POST['adv_dhcp6_id_assoc_statement_prefix'];
- if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_id']))
+ if (is_numericint($_POST['adv_dhcp6_id_assoc_statement_prefix_id']))
$wancfg['adv_dhcp6_id_assoc_statement_prefix_id'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_id'];
if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_pltime']))
$wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_pltime'];
if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_vltime']))
$wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_vltime'];
- if (!empty($_POST['adv_dhcp6_prefix_interface_statement_sla_id']))
+ if (is_numericint($_POST['adv_dhcp6_prefix_interface_statement_sla_id']))
$wancfg['adv_dhcp6_prefix_interface_statement_sla_id'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_id'];
- if (!empty($_POST['adv_dhcp6_prefix_interface_statement_sla_len']))
+ if (is_numericint($_POST['adv_dhcp6_prefix_interface_statement_sla_len']))
$wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_len'];
if (!empty($_POST['adv_dhcp6_authentication_statement_authname']))
OpenPOWER on IntegriCloud