CLOUDSTACK-9287 - Generate new mac address if router is redundant and nic profile exists

This commit is contained in:
Wilder Rodrigues 2016-02-13 12:59:20 +01:00 committed by Remi Bergsma
parent ef115ab1d0
commit f921ec686b
1 changed files with 5 additions and 0 deletions

View File

@ -85,6 +85,11 @@ public class NicProfileHelperImpl implements NicProfileHelper {
new NicProfile(privateNic, privateNetwork, privateNic.getBroadcastUri(), privateNic.getIsolationUri(), _networkModel.getNetworkRate(
privateNetwork.getId(), router.getId()), _networkModel.isSecurityGroupSupportedInNetwork(privateNetwork), _networkModel.getNetworkTag(
router.getHypervisorType(), privateNetwork));
if (router.getIsRedundantRouter()) {
String newMacAddress = NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ipVO.getMacAddress()));
privateNicProfile.setMacAddress(newMacAddress);
}
} else {
final String netmask = NetUtils.getCidrNetmask(privateNetwork.getCidr());
final PrivateIpAddress ip =