diff options
author | Renato Botelho <renato@netgate.com> | 2016-12-12 16:24:44 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-12-12 16:44:18 -0200 |
commit | f6e519ec4b4eb21ed123e154a78aa763757a2ad8 (patch) | |
tree | 7c590e416c8320aa559802c14137b6e1fda52ab3 /src/usr/local/www/interfaces_groups_edit.php | |
parent | e4830f024bc06c4fad9a545c3ead724b82a6b803 (diff) | |
download | pfsense-f6e519ec4b4eb21ed123e154a78aa763757a2ad8.zip pfsense-f6e519ec4b4eb21ed123e154a78aa763757a2ad8.tar.gz |
Fix #6976: Make sure interface description, interface name and alias don't have the same name
Diffstat (limited to 'src/usr/local/www/interfaces_groups_edit.php')
-rw-r--r-- | src/usr/local/www/interfaces_groups_edit.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php index 0411ecd..214e31b 100644 --- a/src/usr/local/www/interfaces_groups_edit.php +++ b/src/usr/local/www/interfaces_groups_edit.php @@ -109,6 +109,15 @@ if ($_POST) { } } + /* 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['ifname']) { + $input_errors[] = gettext("An alias with this name already exists."); + } + } + } + if (isset($_POST['members'])) { $members = implode(" ", $_POST['members']); } else { |