[Olsr-dev] [olsrd] [PATCH v2 31/33] gateway: ignore zero bandwidth and uni-directional links

Ferry Huberts (spam-protected)
Wed Jul 25 21:29:38 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 6e99195..ec6225c 100644
--- a/src/gateway_default_handler.c
+++ b/src/gateway_default_handler.c
@@ -64,6 +64,11 @@ static void gw_default_choose_gateway(void) {
       continue;
     }
 
+    if (!gw->uplink || !gw->downlink) {
+      /* do not consider nodes without bandwidth or with a uni-directional link */
+      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