]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
A fix in OSPFv3 next_hop calculation.
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 27 Apr 2010 16:29:01 +0000 (18:29 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 27 Apr 2010 16:29:01 +0000 (18:29 +0200)
proto/ospf/rt.c

index 9e63d2c68383cf3c32e1ba806e77bcbf2e0159a3..643da9afe2ebf0ab586c06996363ff2e896d47fb 100644 (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
        * is computed in link_back().
        */
-      struct top_hash_entry *llsa;
-      llsa = ospf_hash_find(po->gr, par->nhi->iface->index, en->lb_id, rid, LSA_T_LINK);
+      struct top_hash_entry *lhe;
+      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;
 
       en->nh = llsa->lladdr;