spf: safer checking against LINK_COST_BROKEN and ROUTE_COST_BROKEN
authorFerry Huberts <ferry.huberts@pelagic.nl>
Sat, 9 Apr 2016 21:37:06 +0000 (23:37 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 11 Apr 2016 10:38:29 +0000 (12:38 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
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 */