diff options
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r-- | src/anytun.cpp | 11 |
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()); |