[Olsr-dev] [olsrd] [PATCH v2 30/33] gateway: ignore unreachable gateways

Ferry Huberts (spam-protected)
Wed Jul 25 21:29:37 CEST 2012


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/gateway_default_handler.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gateway_default_handler.c b/src/gateway_default_handler.c
index ac14716..6e99195 100644
--- a/src/gateway_default_handler.c
+++ b/src/gateway_default_handler.c
@@ -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;
-- 
1.7.11.2





More information about the Olsr-dev mailing list