From 01be08e43e0a70eee9435b9562f747051d8d1fe7 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Fri, 29 Feb 2008 20:06:16 +0000 Subject: removed debug statemet added fallback default route --- routingTable.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routingTable.cpp') diff --git a/routingTable.cpp b/routingTable.cpp index f15f857..2f8afd0 100644 --- a/routingTable.cpp +++ b/routingTable.cpp @@ -83,11 +83,13 @@ u_int16_t RoutingTable::getRoute(const NetworkAddress & addr) if (routes_.empty()) return 0; NetworkPrefix prefix(addr,32); + //TODO Routing algorithem isnt working!!! RoutingMap::iterator it = routes_.lower_bound(prefix); // it--; if (it!=routes_.end()) return it->second; - return 0; + it=routes_.begin(); + return it->second; } u_int16_t* RoutingTable::getOrNewRoutingTEUnlocked(const NetworkPrefix & addr) -- cgit v1.2.3