summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-12-21 21:13:19 +0000
committerOthmar Gsenger <otti@anytun.org>2008-12-21 21:13:19 +0000
commit3eb3af4681a96401c070f76fb78fb5593b795f1a (patch)
treeb2729b3b13b139bc909693a3459fbb5f64f5ddb1 /src/anytun.cpp
parentrewrote syncClient and anytun-showtables (diff)
added route option to anytun
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index ca77e63..a235786 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -409,6 +409,15 @@ int main(int argc, char* argv[])
createConnection(endpoint,cl,gOpt.getSeqWindowSize(), queue, gOpt.getMux());
}
+ RouteList routes = gOpt.getRoutes();
+ RouteList::const_iterator rit;
+ for(rit = routes.begin(); rit != routes.end(); ++rit)
+ {
+ NetworkAddress addr( rit->net_addr );
+ NetworkPrefix prefix( addr, rit->prefix_length );
+ gRoutingTable.addRoute( prefix, gOpt.getMux() );
+ }
+
#ifndef NODAEMON
if(gOpt.getChroot())
chrootAndDrop(gOpt.getChrootDir(), gOpt.getUsername());