[BGPCEP-472] Injecting route with missing next-hop value causes exception in reachability topology builder Created: 02/Jun/16  Updated: 03/Mar/19  Resolved: 06/Jun/16

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration

Type: Bug
Reporter: Ajay L Assignee: Ajay L
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 6001

 Description   

Next-hop is a well-known mandatory attribute and should be present when injecting IPv4/v6 unicast routes. However bad input where the value is missing causes exception to be thrown while updating IPv4/v6 reachability topology

NPE is thrown in else block of AbstractReachabilityTopologyBuilder#advertizingNode when nh is null

private NodeId advertizingNode(final Attributes attrs) {
final CNextHop nh = attrs.getCNextHop();
if (nh instanceof Ipv4NextHopCase)

{ final Ipv4NextHop ipv4 = ((Ipv4NextHopCase) nh).getIpv4NextHop(); return new NodeId(ipv4.getGlobal().getValue()); }

else if (nh instanceof Ipv6NextHopCase)

{ final Ipv6NextHop ipv6 = ((Ipv6NextHopCase) nh).getIpv6NextHop(); return new NodeId(ipv6.getGlobal().getValue()); }

else {
LOG.warn("Unhandled next hop class {}", nh.getImplementedInterface());
return null;
}
}



 Comments   
Comment by Ajay L [ 04/Jun/16 ]

master: https://git.opendaylight.org/gerrit/39855

Comment by Milos Fabian [ 06/Jun/16 ]

stable/beryllium: https://git.opendaylight.org/gerrit/#/c/39872/

Generated at Wed Feb 07 19:13:09 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.