summaryrefslogtreecommitdiff
path: root/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 17:09:06 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 17:09:06 +0000
commit62c4bf0fd2b504798c120284958105681f9e20f6 (patch)
treee04cbc56baf28864313da2a26eb4cb43b43fe920 /anytun.cpp
parentreduced routing sync overhead (diff)
further routing fixes
Diffstat (limited to 'anytun.cpp')
-rw-r--r--anytun.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/anytun.cpp b/anytun.cpp
index acf86c9..2e27b8b 100644
--- a/anytun.cpp
+++ b/anytun.cpp
@@ -81,9 +81,13 @@ void createConnection(const std::string & remote_host, u_int16_t remote_port, Co
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,mux);
- gRoutingTable.addRoute(NetworkPrefix(NetworkAddress()),mux);
+ NetworkAddress addr(ipv4,gOpt.getIfconfigParamRemoteNetmask().c_str());
+ NetworkPrefix prefix(addr);
+ gRoutingTable.addRoute(prefix,mux);
SyncCommand sc (cl,mux);
queue.push(sc);
+ SyncCommand sc2 (prefix);
+ queue.push(sc2);
}