mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-04 19:56:49 +02:00
Bugfix: resolve a NPE caused by quering a non-existing router MAC
Change-Id: Ie059690efd697341b7c9de4a61a1ce8b20e9734f
This commit is contained in:
parent
de67978884
commit
d4066ea7fc
@ -442,12 +442,12 @@ public class OpenstackNetworkManager
|
||||
try {
|
||||
externalPeerRouterMap.computeIfPresent(ipAddress.toString(), (id, existing) ->
|
||||
new DefaultExternalPeerRouter(ipAddress, macAddress, existing.externalPeerRouterVlanId()));
|
||||
|
||||
log.info("Updated external peer router map {}",
|
||||
externalPeerRouterMap.get(ipAddress.toString()).value().toString());
|
||||
} catch (Exception e) {
|
||||
log.error("Exception occurred because of {}", e.toString());
|
||||
}
|
||||
|
||||
log.info("Updated external peer router map {}",
|
||||
externalPeerRouterMap.get(ipAddress.toString()).value().toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -278,11 +278,11 @@ public class OpenstackRoutingArpHandler {
|
||||
|
||||
try {
|
||||
|
||||
Set<String> fipSet = osRouterService.floatingIps().stream()
|
||||
.map(NetFloatingIP::getFloatingIpAddress).collect(Collectors.toSet());
|
||||
Set<String> extRouterIps = osNetworkService.externalPeerRouters().
|
||||
stream().map(r -> r.externalPeerRouterIp().toString()).collect(Collectors.toSet());
|
||||
|
||||
// if the SPA is floating IP, we simply ignores it
|
||||
if (fipSet.contains(spa.toString())) {
|
||||
// if SPA is NOT contained in existing external router IP set, we ignore it
|
||||
if (!extRouterIps.contains(spa.toString())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user