summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-12-23 15:27:33 +0000
committerOthmar Gsenger <otti@anytun.org>2008-12-23 15:27:33 +0000
commit78d5d6ac9bfc8a7bee7e5c7ddd2e5ef9489d0557 (patch)
tree840f57e66951c6c2b06a2f9da1b77fe4fb097601 /src/anytun.cpp
parentcleaner naming for updateRoutingTreeUnlocked now (diff)
some documentation
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index d8f2159..50f2437 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -425,7 +425,16 @@ int main(int argc, char* argv[])
NetworkPrefix prefix( addr, rit->prefix_length );
gRoutingTable.addRoute( prefix, gOpt.getMux() );
}
-
+ if (connect_to.begin() == connect_to.end() && routes.begin() == routes.end() && gOpt.getDevType()=="tun")
+ {
+ std::cout << "No Routes and no syncronisation hosts have be specified"<< std::endl;
+ std::cout << "anytun won't be able to send any data"<< std::endl;
+ std::cout << "most likely you want to add --route 0.0.0.0/0 --route ::/0"<< std::endl;
+ std::cout << "to your command line to allow both ipv4 and ipv6 traffic"<< std::endl;
+ std::cout << "(this does not set operation system routes, use the post-up script"<< std::endl;
+ std::cout << " to set them)"<< std::endl;
+ return -1;
+ }
#ifndef NODAEMON
if(gOpt.getChroot())
chrootAndDrop(gOpt.getChrootDir(), gOpt.getUsername());