From 0ea057c4ed59deb27fe2edc840402f3d3935c39a Mon Sep 17 00:00:00 2001 From: Tim Young Date: Thu, 13 Oct 2016 15:36:46 -0500 Subject: [PATCH] Cannot have both untagged and tagged on an interface --- EduNetworkBuilder/NetworkInterface.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/NetworkInterface.cs b/EduNetworkBuilder/NetworkInterface.cs index 39a4c16..2ebacbf 100644 --- a/EduNetworkBuilder/NetworkInterface.cs +++ b/EduNetworkBuilder/NetworkInterface.cs @@ -102,9 +102,14 @@ namespace EduNetworkBuilder else { if (Tag == VLANTagType.Untagged) - one.Tag = VLANTagType.Forbidden; + one.Tag = VLANTagType.Forbidden; //Only one untagged port allowed at a time if (Tag == VLANTagType.Tagged && !isPort) //Ports can have multiple tags on one interface one.Tag = VLANTagType.Forbidden; + if (Tag == VLANTagType.Tagged && isPort) + { + if(one.Tag != VLANTagType.Tagged) + one.Tag = VLANTagType.Forbidden; //We cannot have an untagged port and tagged ports at the same time + } } } if (!foundit)