From 32fd5e0d1f3e77a39cfc08ab077a5e001fb8c026 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Mon, 22 Dec 2008 01:42:26 +0000 Subject: catching no route exceptions --- src/anytun.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/anytun.cpp b/src/anytun.cpp index a235786..d8f2159 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -161,16 +161,24 @@ void sender(void* p) if(param->cl.empty()) continue; //std::cout << "got Packet for plain "< "<cl.getConnection(mux); + try + { + mux = gRoutingTable.getRoute(plain_packet.getDstAddr()); + //std::cout << " -> "<cl.getConnection(mux); + } + catch (std::exception& e) + { + continue; // no route + } #else - ConnectionMap::iterator cit = param->cl.getBegin(); + cit = param->cl.getBegin(); #endif if(cit==param->cl.getEnd()) - continue; + continue; //no connection ConnectionParam & conn = cit->second; if(conn.remote_end_ == emptyEndpoint) -- cgit v1.2.3