spf: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN
[olsrd.git] / src / olsr_spf.c
index 86d251d..b17cc6a 100644 (file)
@@ -216,7 +216,7 @@ olsr_spf_relax(struct avl_tree *cand_tree, struct tc_entry *tc)
       continue;
     }
 
-    if (tc_edge->cost == LINK_COST_BROKEN) {
+    if (tc_edge->cost >= LINK_COST_BROKEN) {
 #ifdef DEBUG
       OLSR_PRINTF(2, "SPF:   ignore edge %s (broken)\n", olsr_ip_to_string(&buf, &tc_edge->T_dest_addr));
 #endif /* DEBUG */