gateway: ignore unreachable gateways
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 25 Jul 2012 16:28:16 +0000 (18:28 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 25 Jul 2012 19:24:25 +0000 (21:24 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway_default_handler.c

index ac14716..6e99195 100644 (file)
@@ -59,6 +59,11 @@ static void gw_default_choose_gateway(void) {
       continue;
     }
 
+    if (tc->path_cost == ROUTE_COST_BROKEN) {
+      /* do not consider nodes with an infinite ETX */
+      continue;
+    }
+
     /* determine the path costs threshold */
     if (olsr_cnf->smart_gw_thresh == 0) {
       path_cost_times_threshold = tc->path_cost;