summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-04-22 03:04:58 -0500
committerChris Buechler <cmb@pfsense.org>2016-04-22 03:05:36 -0500
commitff4665f033ccf979470f8166f15e363699de56c5 (patch)
treead372049e4e85b430dd1f35b96061537633d40b0 /src
parentaa31bad669a45d1bc2a37f9789e98a09eef70717 (diff)
downloadpfsense-ff4665f033ccf979470f8166f15e363699de56c5.zip
pfsense-ff4665f033ccf979470f8166f15e363699de56c5.tar.gz
Prevent configuring the same parent and VLAN ID multiple times. Ticket #6183
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/config.console.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/etc/inc/config.console.inc b/src/etc/inc/config.console.inc
index f5f5ed7..a5606a6 100644
--- a/src/etc/inc/config.console.inc
+++ b/src/etc/inc/config.console.inc
@@ -578,6 +578,14 @@ function vlan_setup() {
continue;
}
+ if (is_array($config['vlans']['vlan'])) {
+ foreach ($config['vlans']['vlan'] as $existingvlan) {
+ if ($vlan['if'] == $existingvlan['if'] && $vlan['tag'] == $existingvlan['tag']) {
+ printf("\n\n" . gettext("This parent interface and VLAN already created."));
+ continue 2;
+ }
+ }
+ }
$config['vlans']['vlan'][] = $vlan;
$vlanif++;
}
OpenPOWER on IntegriCloud