summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-04-25 08:30:30 +0545
committerRenato Botelho <renato@netgate.com>2017-04-25 11:01:38 -0300
commit039f3db577eb62b34422889ebc7571ad5536cdd7 (patch)
treed4f33fbc5ae2dfeb15909dcc8db214e34a0bc3da
parent1ed363656fb44eaec3d801e26ab2da5e02f2d6ba (diff)
downloadpfsense-039f3db577eb62b34422889ebc7571ad5536cdd7.zip
pfsense-039f3db577eb62b34422889ebc7571ad5536cdd7.tar.gz
Fix #7493 only check interface IP if static
(cherry picked from commit 8c6190e82f83a7907ec2757e72d9a8eac496dd61)
-rw-r--r--src/usr/local/www/interfaces.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 3894bef..681c44d 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -720,7 +720,7 @@ if ($_POST['apply']) {
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
$staticroutes = get_staticroutes(true);
$_POST['spoofmac'] = strtolower(str_replace("-", ":", $_POST['spoofmac']));
- if ($_POST['ipaddr']) {
+ if (($_POST['type'] == 'staticv4') && $_POST['ipaddr']) {
if (!is_ipaddrv4($_POST['ipaddr'])) {
$input_errors[] = gettext("A valid IPv4 address must be specified.");
} else {
@@ -752,7 +752,7 @@ if ($_POST['apply']) {
}
}
}
- if ($_POST['ipaddrv6']) {
+ if (($_POST['type'] == 'staticv6') && $_POST['ipaddrv6']) {
$_POST['ipaddrv6'] = addrtolower($_POST['ipaddrv6']);
if (!is_ipaddrv6($_POST['ipaddrv6'])) {
OpenPOWER on IntegriCloud