IPv6: Fix missed AddressFormat in nic table

This commit is contained in:
Sheng Yang 2013-01-30 19:46:30 -08:00
parent 4adc974ab7
commit f45576bce5
2 changed files with 4 additions and 6 deletions

View File

@ -48,7 +48,7 @@ public class Networks {
public enum AddressFormat {
Ip4,
Ip6,
Mixed
DualStack
}
/**

View File

@ -1317,10 +1317,8 @@ public class NetworkManagerImpl implements NetworkManager, Manager, Listener {
vo.setDefaultNic(profile.isDefaultNic());
if (profile.getIp4Address() != null) {
vo.setIp4Address(profile.getIp4Address());
vo.setAddressFormat(AddressFormat.Ip4);
}
vo.setIp4Address(profile.getIp4Address());
vo.setAddressFormat(profile.getFormat());
if (profile.getMacAddress() != null) {
vo.setMacAddress(profile.getMacAddress());
@ -3372,7 +3370,7 @@ public class NetworkManagerImpl implements NetworkManager, Manager, Listener {
nic.setIp6Gateway(vlan.getIp6Gateway());
nic.setIp6Cidr(vlan.getIp6Cidr());
if (ipv4) {
nic.setFormat(AddressFormat.Mixed);
nic.setFormat(AddressFormat.DualStack);
} else {
nic.setIsolationUri(IsolationType.Vlan.toUri(vlan.getVlanTag()));
nic.setBroadcastType(BroadcastDomainType.Vlan);