From 9c7c22eb845754492568c63dc50278076fbcf76d Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Tue, 25 Aug 2020 15:19:02 +0530 Subject: [PATCH] engine: honour bypass VLAN id/range for L2 networks (#4274) * engine: honour bypass VLAN id/range for L2 networks Commit e894238d904a9c49c1140371f612a51d251efc1 (#3899) allowed private gateways to bypass vlan check while refactoring it did not cover the case for L2 but only shared network. This fix will re-enable honouring the bypass vlan check option for L2 guest network (in addition to the Shared networks). Signed-off-by: Rohit Yadav * Update NetworkOrchestrator.java --- .../cloudstack/engine/orchestration/NetworkOrchestrator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 4c6d2603e1e..ab2d8f3e55c 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -2529,7 +2529,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra * @param ntwkOff network offering */ private boolean hasGuestBypassVlanOverlapCheck(final boolean bypassVlanOverlapCheck, final NetworkOfferingVO ntwkOff, final boolean isPrivateNetwork) { - return bypassVlanOverlapCheck && (ntwkOff.getGuestType() == GuestType.Shared || isPrivateNetwork); + return bypassVlanOverlapCheck && (ntwkOff.getGuestType() != GuestType.Isolated || isPrivateNetwork); } /**