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:42 -0300
commit39413152f93d9eec3789ed11349cb10e49100927 (patch)
tree62125cf91d65673aee80a578cb48c66ec35d6e30
parent8b2def83f0de06a082828528eb5365f8cf06974b (diff)
downloadpfsense-39413152f93d9eec3789ed11349cb10e49100927.zip
pfsense-39413152f93d9eec3789ed11349cb10e49100927.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