summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_vlan_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-08-12 18:16:18 +0000
committerErmal <eri@pfsense.org>2013-08-12 18:16:18 +0000
commit1ca626e7b824cbff5d1aa87c4e416373fcc1a2d9 (patch)
tree6fd0014270eb4aab2fe4c10447412eacb5c201ac /usr/local/www/interfaces_vlan_edit.php
parentf8466c3637eb87c406f0c3722eba65b843fcf56c (diff)
downloadpfsense-1ca626e7b824cbff5d1aa87c4e416373fcc1a2d9.zip
pfsense-1ca626e7b824cbff5d1aa87c4e416373fcc1a2d9.tar.gz
Prevent assigned vlans from being changed the tag.
Diffstat (limited to 'usr/local/www/interfaces_vlan_edit.php')
-rwxr-xr-xusr/local/www/interfaces_vlan_edit.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php
index 524f9f3..ced8611 100755
--- a/usr/local/www/interfaces_vlan_edit.php
+++ b/usr/local/www/interfaces_vlan_edit.php
@@ -83,6 +83,12 @@ if ($_POST) {
if (!does_interface_exist($_POST['if']))
$input_errors[] = gettext("Interface supplied as parent is invalid");
+ if (isset($id)) {
+ if ($_POST['tag'] && $_POST['tag'] != $a_vlans[$id]['tag']) {
+ if (!empty($a_vlans[$id]['vlanif']) && convert_real_interface_to_friendly_interface_name($a_vlans[$id]['vlanif']) != NULL)
+ $input_errors[] = gettext("Interface is assigned and you cannot change the VLAN tag while assigned.");
+ }
+ }
foreach ($a_vlans as $vlan) {
if (isset($id) && ($a_vlans[$id]) && ($a_vlans[$id] === $vlan))
continue;
OpenPOWER on IntegriCloud