summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-04-25 11:01:30 -0300
committerRenato Botelho <renato@netgate.com>2017-04-25 11:01:30 -0300
commit64cbd8aa405d1c530e9bb0cd62b6fb6690571235 (patch)
treefb3bd17a729a547450ba068c20ab11626fa4c595 /src
parent1607d94f5e229422ab75b01c0a4f0869844ae945 (diff)
parent8c6190e82f83a7907ec2757e72d9a8eac496dd61 (diff)
downloadpfsense-64cbd8aa405d1c530e9bb0cd62b6fb6690571235.zip
pfsense-64cbd8aa405d1c530e9bb0cd62b6fb6690571235.tar.gz
Merge pull request #3705 from phil-davis/interface-static-check
Diffstat (limited to 'src')
-rwxr-xr-xsrc/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 7d8cc8f..7daf820 100755
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -692,7 +692,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 {
@@ -724,7 +724,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