mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge pull request #916 from kansal/CLOUDSTACK-8940
CLOUDSTACK-8940: Wrong value is inserted into nics table netmask field when creating a VM - Fixed Problem: When creating a VM in shared network with no service, the value of netmask is added in the table in the CIDR format unlike other cases where it is added as normal string in the format xxx.xxx.xxx.xxx. The netmask column in the nics table has a length of 15 chars which gets violated if the CIDR exceeds it(Max CIDR length can be 18). Fix: Before storing the netmask convert from CIDR to native format. * pr/916: CLOUDSTACK-8940: Wrong value is inserted into nics table netmask field when creating a VM - Fixed Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
commit
3d213b66e7
@ -1932,9 +1932,9 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
|
||||
|
||||
}
|
||||
|
||||
// nic ip address isn ot set here. Because the DHCP is external to cloudstack
|
||||
// nic ip address is not set here. Because the DHCP is external to cloudstack
|
||||
nic.setIPv4Gateway(network.getGateway());
|
||||
nic.setIPv4Netmask(network.getCidr());
|
||||
nic.setIPv4Netmask(NetUtils.getCidrNetmask(network.getCidr()));
|
||||
|
||||
List<VlanVO> vlan = _vlanDao.listVlansByNetworkId(network.getId());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user