summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces_groups_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-12-12 16:42:53 -0200
committerRenato Botelho <renato@netgate.com>2016-12-12 16:44:18 -0200
commit768037ee1f59f46b340a08d12f9c07a107d237cc (patch)
tree20b5d55784859e8dad9f3b9d0d80b6371f375f49 /src/usr/local/www/interfaces_groups_edit.php
parent6af92afd1fbe589af28de2c31fe7b1b7763f81ec (diff)
downloadpfsense-768037ee1f59f46b340a08d12f9c07a107d237cc.zip
pfsense-768037ee1f59f46b340a08d12f9c07a107d237cc.tar.gz
Do not allow a group name to start with 'pkg-', reserve it for packages use (e.g. tinc)
Diffstat (limited to 'src/usr/local/www/interfaces_groups_edit.php')
-rw-r--r--src/usr/local/www/interfaces_groups_edit.php8
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 a7f69e2..c6bea22 100644
--- a/src/usr/local/www/interfaces_groups_edit.php
+++ b/src/usr/local/www/interfaces_groups_edit.php
@@ -111,6 +111,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.";
OpenPOWER on IntegriCloud