Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1883#discussion_r95034912
  
    --- Diff: engine/schema/src/com/cloud/network/dao/NetworkDaoImpl.java ---
    @@ -377,11 +377,16 @@ protected void addAccountToNetwork(final long 
networkId, final long accountId, f
         }
     
         @Override
    -    public String getNextAvailableMacAddress(final long networkConfigId) {
    +    public String getNextAvailableMacAddress(final long networkConfigId, 
Integer zoneMacIdentifier) {
             final SequenceFetcher fetch = SequenceFetcher.getInstance();
    -
             long seq = fetch.getNextSequence(Long.class, _tgMacAddress, 
networkConfigId);
    -        seq = seq | _prefix << 40 | _rand.nextInt(Short.MAX_VALUE) << 16 & 
0x00000000ffff0000l;
    +        if(zoneMacIdentifier!=0){
    +            seq = seq | _prefix << 40 | (long)zoneMacIdentifier << 32 | 
networkConfigId << 16 & 0x00000000ffff0000l;
    +        }
    +        else {
    +            seq = seq | _prefix << 40 | _rand.nextInt(Short.MAX_VALUE) << 
16 & 0x00000000ffff0000l;
    +
    +        }
    --- End diff --
    
    Please format per coding standards.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to