summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/anytun.cpp4
-rw-r--r--src/options.cpp2
2 files changed, 5 insertions, 1 deletions
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_)