diff options
-rw-r--r-- | src/usr/local/www/interfaces_groups_edit.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php index 2847efc..67d1474 100644 --- a/src/usr/local/www/interfaces_groups_edit.php +++ b/src/usr/local/www/interfaces_groups_edit.php @@ -79,6 +79,14 @@ if ($_POST) { $input_errors[] = gettext("Group name cannot end with digit."); } + /* + * Packages (e.g. tinc) creates interface groups, reserve this + * namespace pkg- for them + */ + if (substr($_POST['ifname'], 0, 4) == 'pkg-') { + $input_errors[] = gettext("Group name cannot start with pkg-"); + } + foreach ($interface_list_disabled as $gif => $gdescr) { if ($gdescr == $_POST['ifname'] || $gif == $_POST['ifname']) { $input_errors[] = "The specified group name is already used by an interface. Please choose another name."; |