0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

A fix in OSPFv3 next_hop calculation.

This commit is contained in:
Ondrej Zajicek 2010-04-27 18:29:01 +02:00
parent 96599c957b
commit 48b0814ace

View File

@ -1300,10 +1300,15 @@ calc_next_hop(struct ospf_area *oa, struct top_hash_entry *en,
* Next-hop is taken from lladdr field of Link-LSA, en->lb_id * Next-hop is taken from lladdr field of Link-LSA, en->lb_id
* is computed in link_back(). * is computed in link_back().
*/ */
struct top_hash_entry *llsa; struct top_hash_entry *lhe;
llsa = ospf_hash_find(po->gr, par->nhi->iface->index, en->lb_id, rid, LSA_T_LINK); lhe = ospf_hash_find(po->gr, par->nhi->iface->index, en->lb_id, rid, LSA_T_LINK);
if (!llsa || ipa_zero(llsa->lladdr)) if (!lhe)
return 0;
struct ospf_lsa_link *llsa = lhe->lsa_body;
if (ipa_zero(llsa->lladdr))
return 0; return 0;
en->nh = llsa->lladdr; en->nh = llsa->lladdr;