summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-22 08:42:41 -0200
committerRenato Botelho <renato@netgate.com>2016-01-22 08:42:41 -0200
commit24049bb6cc494bd0bb367a0af8b1ab495964b1fa (patch)
tree5089336c63fecbd21c20e688c6ae6f2711bbff6e /src/usr/local/www/interfaces.php
parent9c29a65b3df3a81aed2fe1ee64daad5458934760 (diff)
downloadpfsense-24049bb6cc494bd0bb367a0af8b1ab495964b1fa.zip
pfsense-24049bb6cc494bd0bb367a0af8b1ab495964b1fa.tar.gz
Do not let interface description to have same name of an interface group. Fixes #5795
Diffstat (limited to 'src/usr/local/www/interfaces.php')
-rw-r--r--src/usr/local/www/interfaces.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 7fed324..3febf6e 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -288,6 +288,14 @@ if (is_array($config['aliases']['alias'])) {
}
}
+if (is_array($config['ifgroups']['ifgroupentry'])) {
+ foreach ($config['ifgroups']['ifgroupentry'] as $ifgroupentry) {
+ if ($ifgroupentry['ifname'] == $wancfg['descr']) {
+ $input_errors[] = sprintf(gettext("Sorry, an interface group with the name %s already exists. Interfaces cannot have the same name as an interface group."), $wancfg['descr']);
+ }
+ }
+}
+
switch ($wancfg['ipaddr']) {
case "dhcp":
$pconfig['type'] = "dhcp";
OpenPOWER on IntegriCloud