routing table: safer checking against LINK_COST_BROKEN & ROUTE_COST_BROKEN
authorFerry Huberts <ferry.huberts@pelagic.nl>
Sat, 9 Apr 2016 21:37:23 +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/routing_table.c

index eaffe4d..933692b 100644 (file)
@@ -298,7 +298,7 @@ olsr_insert_rt_path(struct rt_path *rtp, struct tc_entry *tc, struct link_entry
   /*
    * no unreachable routes please.
    */
-  if (tc->path_cost == ROUTE_COST_BROKEN) {
+  if (tc->path_cost >= ROUTE_COST_BROKEN) {
     return;
   }