summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-01 09:59:45 +0545
committerPhil Davis <phil.davis@inf.org>2017-02-01 09:59:45 +0545
commitc9d93b62b0cc559d1ed4326212b6385cae2eb398 (patch)
tree78f16ef7248615d6e06a16d31691f3695ba5c398 /src/usr/local/www/interfaces.php
parent070379bbc0cf84d82f52a0adfe2bdc6014695f7e (diff)
downloadpfsense-c9d93b62b0cc559d1ed4326212b6385cae2eb398.zip
pfsense-c9d93b62b0cc559d1ed4326212b6385cae2eb398.tar.gz
Redmine #7173 Do not allow pkg_ for If, IfGroup, Alias
Diffstat (limited to 'src/usr/local/www/interfaces.php')
-rwxr-xr-xsrc/usr/local/www/interfaces.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index f19ee43..108de24 100755
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -524,6 +524,15 @@ if ($_POST['apply']) {
if (is_numeric($_POST['descr'])) {
$input_errors[] = gettext("The interface description cannot contain only numbers.");
}
+
+ /*
+ * Packages (e.g. tinc) create interface groups, reserve this
+ * namespace pkg_ for them.
+ * One namespace is shared by Interfaces, Interface Groups and Aliases.
+ */
+ if (substr($_POST['descr'], 0, 4) == 'pkg_') {
+ $input_errors[] = gettext("The interface description cannot start with pkg_");
+ }
}
if (isset($config['dhcpd']) && isset($config['dhcpd'][$if]['enable'])) {
OpenPOWER on IntegriCloud