summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
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());