Fix public NIC NPE on broadcast URI

This commit is contained in:
nvazquez 2023-11-01 00:34:42 -03:00
parent dc90d0b9dd
commit e3a2762235
No known key found for this signature in database
GPG Key ID: 656E1BCC8CB54F84
1 changed files with 2 additions and 1 deletions

View File

@ -1359,7 +1359,8 @@ public class CommandSetupHelper {
nicTO.setMac(ipAddress.getVifMacAddress());
nicTO.setType(ipAddress.getTrafficType());
nicTO.setGateway(ipAddress.getVlanGateway());
nicTO.setBroadcastUri(BroadcastDomainType.fromString(ipAddress.getBroadcastUri()));
URI broadcastUri = ipAddress.getBroadcastUri() != null ? BroadcastDomainType.fromString(ipAddress.getBroadcastUri()) : null;
nicTO.setBroadcastUri(broadcastUri);
nicTO.setType(network.getTrafficType());
nicTO.setName(_networkModel.getNetworkTag(router.getHypervisorType(), network));
nicTO.setBroadcastType(network.getBroadcastDomainType());