summaryrefslogtreecommitdiff
path: root/routingTable.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 14:45:36 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 14:45:36 +0000
commit14553064606f04e51a8bb0f846583a9e1bb6766d (patch)
treeb9076c2731d16c7a615fcc14329153ca238cf9d6 /routingTable.cpp
parentadded debug statement (diff)
bugfix empty routing table with existent connections
Diffstat (limited to 'routingTable.cpp')
-rw-r--r--routingTable.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/routingTable.cpp b/routingTable.cpp
index 29302fb..10a6041 100644
--- a/routingTable.cpp
+++ b/routingTable.cpp
@@ -80,6 +80,8 @@ void RoutingTable::delRoute(const NetworkPrefix & pref )
u_int16_t RoutingTable::getRoute(const NetworkAddress & addr)
{
Lock lock(mutex_);
+ if (routes_.empty())
+ return 0;
NetworkPrefix prefix(addr);
prefix.setNetworkPrefixLength(32);
RoutingMap::iterator it = routes_.lower_bound(prefix);