summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-18 21:49:32 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-18 21:49:32 +0545
commitb9abac57ece83c4baeedfcd470dcab1084f98ae6 (patch)
tree22a8c0a317ec3ea08558945cb87642ddf5ca6420
parentfdc515af3361bd0371f236557fa018b41d61578c (diff)
downloadpfsense-b9abac57ece83c4baeedfcd470dcab1084f98ae6.zip
pfsense-b9abac57ece83c4baeedfcd470dcab1084f98ae6.tar.gz
Fix #5778 do not save changes if interface description matches an alias name - RELENG_2_2
-rw-r--r--usr/local/www/interfaces.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7184dee..baf59af 100644
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -504,6 +504,16 @@ if ($_POST['apply']) {
break;
}
}
+
+ /* Is the description already used as an alias name? */
+ if (is_array($config['aliases']['alias'])) {
+ foreach ($config['aliases']['alias'] as $alias) {
+ if ($alias['name'] == $_POST['descr']) {
+ $input_errors[] = sprintf(gettext("Sorry, an alias with the name %s already exists."), $_POST['descr']);
+ }
+ }
+ }
+
if(is_numeric($_POST['descr'])) {
$input_errors[] = gettext("The interface description cannot contain only numbers.");
}
OpenPOWER on IntegriCloud