diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-12-21 21:13:19 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-12-21 21:13:19 +0000 |
commit | 3eb3af4681a96401c070f76fb78fb5593b795f1a (patch) | |
tree | b2729b3b13b139bc909693a3459fbb5f64f5ddb1 /src/anytun.cpp | |
parent | rewrote syncClient and anytun-showtables (diff) |
added route option to anytun
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r-- | src/anytun.cpp | 9 |
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()); |