summaryrefslogtreecommitdiff
path: root/routingTable.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-29 20:06:16 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-29 20:06:16 +0000
commit01be08e43e0a70eee9435b9562f747051d8d1fe7 (patch)
tree9b8ec295933e1e50d6f7edc69fbecd99738d6d96 /routingTable.cpp
parentredone the bad anyrtpproxy (diff)
removed debug statemet
added fallback default route
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)