diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-02-27 21:25:34 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-02-27 21:25:34 +0000 |
commit | 0fbddcb83a4a3f79da8ba01d593f4064f0ce26ac (patch) | |
tree | a9edad038475d880e2e52a6d416eeafd0536da1b /anytun.cpp | |
parent | added mux to options (diff) |
added mux support and routing table
Diffstat (limited to 'anytun.cpp')
-rw-r--r-- | anytun.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |