From 78d5d6ac9bfc8a7bee7e5c7ddd2e5ef9489d0557 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Tue, 23 Dec 2008 15:27:33 +0000 Subject: some documentation --- src/anytun.cpp | 11 ++++++++++- src/man/anytun.8.txt | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src') 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()); diff --git a/src/man/anytun.8.txt b/src/man/anytun.8.txt index 6a6dd0f..76c274d 100644 --- a/src/man/anytun.8.txt +++ b/src/man/anytun.8.txt @@ -30,6 +30,7 @@ SYNOPSIS [ *-x|--post-up-script*