From 0fbddcb83a4a3f79da8ba01d593f4064f0ce26ac Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Wed, 27 Feb 2008 21:25:34 +0000 Subject: added mux support and routing table --- anytun.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'anytun.cpp') diff --git a/anytun.cpp b/anytun.cpp index a408019..023160d 100644 --- a/anytun.cpp +++ b/anytun.cpp @@ -94,8 +94,9 @@ void createConnection(const std::string & remote_host, u_int16_t remote_port, Co kd->init(Buffer(key, sizeof(key)), Buffer(salt, sizeof(salt))); cLog.msg(Log::PRIO_NOTICE) << "added connection remote host " << remote_host << ":" << remote_port; ConnectionParam connparam ( (*kd), (*seq), seq_nr_, remote_host, remote_port); - cl.addConnection(connparam,0); - SyncCommand sc (cl,0); + cl.addConnection(connparam,gOpt.getMux()); + gRoutingTable.addRoute(NetworkPrefix(NetworkAddress()),gOpt.getMux()); + SyncCommand sc (cl,gOpt.getMux()); queue.push(sc); } @@ -154,7 +155,7 @@ void* sender(void* p) if(param->cl.empty()) continue; - gRoutingTable.getRoute(NetworkAddress()); + mux = gRoutingTable.getRoute(NetworkAddress()); ConnectionMap::iterator cit = param->cl.getConnection(mux); if(cit==param->cl.getEnd()) continue; -- cgit v1.2.3