mirror of https://github.com/apache/cloudstack.git
bug 12705: Don't set first ip if it's not source NAT
It would happen with first ip of nics other than first public nic. status 12705: resolved fixed
This commit is contained in:
parent
d56d1f699d
commit
1bc44a578d
|
|
@ -1583,6 +1583,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||
if (add && correctVif == null) {
|
||||
addVif = true;
|
||||
} else if (!add && firstIP) {
|
||||
/* FIXME: This is incorrect. Because you can only tell if it's the first IP in this bundle of ip address which send to the router,
|
||||
* but don't know if it's the only IP left in the router - because we didn't send all the related vlan's IPs to the router now. */
|
||||
removeVif = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2443,6 +2443,10 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
IpAddressTO[] ipsToSend = new IpAddressTO[ipAddrList.size()];
|
||||
int i = 0;
|
||||
boolean firstIP = true;
|
||||
/* If the first IP is not source NAT, then don't treat it as first IP. It would happen if it's the first IP for public nic other than first one */
|
||||
if (!ipAddrList.get(0).isSourceNat()) {
|
||||
firstIP = false;
|
||||
}
|
||||
for (final PublicIpAddress ipAddr : ipAddrList) {
|
||||
|
||||
boolean add = (ipAddr.getState() == IpAddress.State.Releasing ? false : true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue