]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
OSPF: Fix ECMP external merging
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 15 Dec 2016 14:31:25 +0000 (15:31 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 15 Dec 2016 14:37:27 +0000 (15:37 +0100)
The variable nfa is not cleaned before each loop iteration and can have
a wrong value of nfa.nhs_reuse from the previous step.

Thanks to Bernardo Figueiredo for the bugreport and analysis.

proto/ospf/rt.c

index 21aaf14453fd32df91a3f91f6d8be4307cd14037..368e3d05257498238cafa5207f25d54bc288423f 100644 (file)
@@ -1405,7 +1405,6 @@ ospf_ext_spf(struct ospf_proto *p)
   struct top_hash_entry *en;
   struct ospf_lsa_ext_local rt;
   ort *nf1, *nf2;
-  orta nfa = {};
   ip_addr rtid;
   u32 br_metric;
   struct ospf_area *atmp;
@@ -1414,6 +1413,8 @@ ospf_ext_spf(struct ospf_proto *p)
 
   WALK_SLIST(en, p->lsal)
   {
+    orta nfa = {};
+
     /* 16.4. (1) */
     if ((en->lsa_type != LSA_T_EXT) && (en->lsa_type != LSA_T_NSSA))
       continue;