summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-02-01 07:46:23 -0200
committerRenato Botelho <renato@netgate.com>2017-02-01 07:46:23 -0200
commit98edca822ce69a53a0d8e8521d8e0b3f365224db (patch)
tree8ffcaf23049ec908e76b3b6b0e2e51b800eee0bd /src
parentb99577496ecfc895aa28cc3fbbe7ab98cdd99cb3 (diff)
parentc9d93b62b0cc559d1ed4326212b6385cae2eb398 (diff)
downloadpfsense-98edca822ce69a53a0d8e8521d8e0b3f365224db.zip
pfsense-98edca822ce69a53a0d8e8521d8e0b3f365224db.tar.gz
Merge pull request #3458 from phil-davis/ifname-nopkg
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/firewall_aliases_edit.php9
-rwxr-xr-xsrc/usr/local/www/interfaces.php9
-rw-r--r--src/usr/local/www/interfaces_groups_edit.php8
3 files changed, 22 insertions, 4 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php
index 161960b..9a82a58 100644
--- a/src/usr/local/www/firewall_aliases_edit.php
+++ b/src/usr/local/www/firewall_aliases_edit.php
@@ -173,6 +173,15 @@ if ($_POST) {
}
}
+ /*
+ * 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['name'], 0, 4) == 'pkg_') {
+ $input_errors[] = gettext("The alias name cannot start with pkg_");
+ }
+
/* check for name interface description conflicts */
foreach ($config['interfaces'] as $interface) {
if (strcasecmp($interface['descr'], $_POST['name']) == 0) {
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'])) {
diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php
index 434de73..daa0348 100644
--- a/src/usr/local/www/interfaces_groups_edit.php
+++ b/src/usr/local/www/interfaces_groups_edit.php
@@ -88,11 +88,11 @@ if ($_POST) {
}
/*
- * Packages (e.g. tinc) creates interface groups, reserve this
- * namespace pkg- for them
+ * Packages (e.g. tinc) create interface groups, reserve this
+ * namespace pkg_ for them
*/
- if (substr($_POST['ifname'], 0, 4) == 'pkg-') {
- $input_errors[] = gettext("Group name cannot start with pkg-");
+ if (substr($_POST['ifname'], 0, 4) == 'pkg_') {
+ $input_errors[] = gettext("Group name cannot start with pkg_");
}
foreach ($interface_list_disabled as $gif => $gdescr) {
OpenPOWER on IntegriCloud