From 020ee1bc191ea36d2e911fd4549225641c66027b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 21 Jan 2009 01:50:33 +0000 Subject: no routing disable -R and warning --- src/anytun.cpp | 4 +++- src/options.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/anytun.cpp b/src/anytun.cpp index 46cdead..eb695cf 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -390,7 +390,8 @@ int main(int argc, char* argv[]) createConnection(endpoint,gOpt.getSeqWindowSize(), gOpt.getMux()); } - RouteList routes = gOpt.getRoutes(); +#ifndef NO_ROUTING + RouteList routes = gOpt.getRoutes(); RouteList::const_iterator rit; for(rit = routes.begin(); rit != routes.end(); ++rit) { @@ -408,6 +409,7 @@ int main(int argc, char* argv[]) std::cout << " to set them)"<< std::endl; return -1; } +#endif #ifndef NO_DAEMON if(gOpt.getChroot()) chrootAndDrop(gOpt.getChrootDir(), gOpt.getUsername()); diff --git a/src/options.cpp b/src/options.cpp index 58ac181..c738281 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -337,7 +337,9 @@ bool Options::parse(int argc, char* argv[]) #ifndef NO_EXEC PARSE_SCALAR_PARAM("-x","--post-up-script", post_up_script_) #endif +#ifndef NO_ROUTING PARSE_CSLIST_PARAM("-R","--route", routes_, OptionRoute) +#endif PARSE_SCALAR_PARAM("-s","--sender-id", sender_id_) PARSE_SCALAR_PARAM("-m","--mux", mux_) -- cgit v1.2.3