diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-09-23 14:38:16 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-09-23 14:38:16 -0700 |
| commit | 80dc7fb67584ee29e7e907b7ccd48c6f217923c3 (patch) | |
| tree | d4872740da186148b8407ab64f0c705b0a8d6853 /one.cpp | |
| parent | a3ed5277ef1cb02096137750278e6a4910f5efeb (diff) | |
| download | infinitytier-80dc7fb67584ee29e7e907b7ccd48c6f217923c3.tar.gz infinitytier-80dc7fb67584ee29e7e907b7ccd48c6f217923c3.zip | |
Pick random port on -p0
Diffstat (limited to 'one.cpp')
| -rw-r--r-- | one.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -910,7 +910,7 @@ static void printHelp(const char *cn,FILE *out) fprintf(out," -h - Display this help"ZT_EOL_S); fprintf(out," -v - Show version"ZT_EOL_S); fprintf(out," -U - Run as unprivileged user (skip privilege check)"ZT_EOL_S); - fprintf(out," -p<port> - Port for UDP and TCP/HTTP (default: 9993)"ZT_EOL_S); + fprintf(out," -p<port> - Port for UDP and TCP/HTTP (default: 9993, 0 for random)"ZT_EOL_S); //fprintf(out," -T<path> - Override root topology, do not authenticate or update"ZT_EOL_S); #ifdef __UNIX_LIKE__ @@ -985,7 +985,7 @@ int main(int argc,char **argv) case 'p': // port -- for both UDP and TCP, packets and control plane port = Utils::strToUInt(argv[i] + 2); - if ((port > 0xffff)||(port == 0)) { + if (port > 0xffff) { printHelp(argv[0],stdout); return 1; } |
