summaryrefslogtreecommitdiff
path: root/routingTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'routingTable.cpp')
-rw-r--r--routingTable.cpp4
1 files changed, 3 insertions, 1 deletions
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)