summaryrefslogtreecommitdiff
path: root/routingTable.cpp
diff options
context:
space:
mode:
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);