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 <rohit.yadav@shapeblue.com>

* Update NetworkOrchestrator.java
This commit is contained in:
Rohit Yadav 2020-08-25 15:19:02 +05:30 committed by GitHub
parent 05ae3f8d81
commit 9c7c22eb84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
/**