cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sw...@apache.org
Subject [03/18] git commit: updated refs/heads/master to 103d62e
Date Thu, 12 May 2016 15:05:31 GMT
CLOUDSTACK-9287 - Generate new mac address if router is redundant and nic profile exists


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f921ec68
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f921ec68
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f921ec68

Branch: refs/heads/master
Commit: f921ec686bcf339968040c57bf0ae9fceffd8fed
Parents: ef115ab
Author: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Authored: Sat Feb 13 12:59:20 2016 +0100
Committer: Remi Bergsma <github@remi.nl>
Committed: Sat Apr 9 21:13:28 2016 +0200

----------------------------------------------------------------------
 server/src/com/cloud/network/router/NicProfileHelperImpl.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f921ec68/server/src/com/cloud/network/router/NicProfileHelperImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/NicProfileHelperImpl.java b/server/src/com/cloud/network/router/NicProfileHelperImpl.java
index 4a0faa9..2fc5a42 100644
--- a/server/src/com/cloud/network/router/NicProfileHelperImpl.java
+++ b/server/src/com/cloud/network/router/NicProfileHelperImpl.java
@@ -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 =


Mime
View raw message