diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-22 08:42:41 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-22 08:42:41 -0200 |
commit | 24049bb6cc494bd0bb367a0af8b1ab495964b1fa (patch) | |
tree | 5089336c63fecbd21c20e688c6ae6f2711bbff6e | |
parent | 9c29a65b3df3a81aed2fe1ee64daad5458934760 (diff) | |
download | pfsense-24049bb6cc494bd0bb367a0af8b1ab495964b1fa.zip pfsense-24049bb6cc494bd0bb367a0af8b1ab495964b1fa.tar.gz |
Do not let interface description to have same name of an interface group. Fixes #5795
-rw-r--r-- | src/usr/local/www/interfaces.php | 8 |
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"; |