Skip to content

Commit f45576b

Browse files
author
Sheng Yang
committed
IPv6: Fix missed AddressFormat in nic table
1 parent 4adc974 commit f45576b

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

api/src/com/cloud/network/Networks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public enum Mode {
4848
public enum AddressFormat {
4949
Ip4,
5050
Ip6,
51-
Mixed
51+
DualStack
5252
}
5353

5454
/**

server/src/com/cloud/network/NetworkManagerImpl.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,10 +1317,8 @@ protected Integer applyProfileToNic(NicVO vo, NicProfile profile, Integer device
13171317

13181318
vo.setDefaultNic(profile.isDefaultNic());
13191319

1320-
if (profile.getIp4Address() != null) {
1321-
vo.setIp4Address(profile.getIp4Address());
1322-
vo.setAddressFormat(AddressFormat.Ip4);
1323-
}
1320+
vo.setIp4Address(profile.getIp4Address());
1321+
vo.setAddressFormat(profile.getFormat());
13241322

13251323
if (profile.getMacAddress() != null) {
13261324
vo.setMacAddress(profile.getMacAddress());
@@ -3372,7 +3370,7 @@ public void allocateDirectIp(NicProfile nic, DataCenter dc, VirtualMachineProfil
33723370
nic.setIp6Gateway(vlan.getIp6Gateway());
33733371
nic.setIp6Cidr(vlan.getIp6Cidr());
33743372
if (ipv4) {
3375-
nic.setFormat(AddressFormat.Mixed);
3373+
nic.setFormat(AddressFormat.DualStack);
33763374
} else {
33773375
nic.setIsolationUri(IsolationType.Vlan.toUri(vlan.getVlanTag()));
33783376
nic.setBroadcastType(BroadcastDomainType.Vlan);

0 commit comments

Comments
 (0)