mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 02:53:55 +00:00
bgpd: Ensure we don't crash when registering RA's
There exists a code path that the ifp can be NULL. Prevent an accident. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
547b989938
commit
8c9769e03b
@ -428,8 +428,10 @@ void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id)
|
||||
|
||||
ifp = if_lookup_by_index(nexthop->ifindex,
|
||||
nexthop->vrf_id);
|
||||
if (ifp)
|
||||
zclient_send_interface_radv_req(
|
||||
zclient, nexthop->vrf_id, ifp, true,
|
||||
zclient, nexthop->vrf_id, ifp,
|
||||
true,
|
||||
BGP_UNNUM_DEFAULT_RA_INTERVAL);
|
||||
}
|
||||
/* There is at least one label-switched path */
|
||||
@ -898,8 +900,11 @@ void bgp_nht_register_enhe_capability_interfaces(struct peer *peer)
|
||||
return;
|
||||
|
||||
for (nhop = bnc->nexthop; nhop; nhop = nhop->next) {
|
||||
ifp = if_lookup_by_index(nhop->ifindex,
|
||||
nhop->vrf_id);
|
||||
ifp = if_lookup_by_index(nhop->ifindex, nhop->vrf_id);
|
||||
|
||||
if (!ifp)
|
||||
continue;
|
||||
|
||||
zclient_send_interface_radv_req(zclient,
|
||||
nhop->vrf_id,
|
||||
ifp, true,
|
||||
|
Loading…
Reference in New Issue
Block a user