[pve-devel] [PATCH common] show warning when using VLAN 1 on a VLAN aware bridge

Dominik Csapak d.csapak at proxmox.com
Wed May 18 11:18:29 CEST 2016


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/Network.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
index 0a984ad..71af2b8 100644
--- a/src/PVE/Network.pm
+++ b/src/PVE/Network.pm
@@ -179,6 +179,8 @@ my $bridge_add_interface = sub {
 	if ($tag) {
 	    system("/sbin/bridge vlan add dev $iface vid $tag pvid untagged") == 0 ||
 	    die "unable to add vlan $tag to interface $iface\n";
+
+	    warn "Caution: Setting VLAN ID 1 on a VLAN aware bridge may be dangerous\n" if $tag == 1;
 	} else {
 	    system("/sbin/bridge vlan add dev $iface vid 2-4094") == 0 ||
 	    die "unable to add default vlan tags to interface $iface\n" if !$trunks;
-- 
2.1.4





More information about the pve-devel mailing list