X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=2fe4e790839a301e4a8cca7821523a1626c56b4f;hb=a1f4f14c6c5e269c901e6e019418fb8f789cf96b;hp=1c96524dc71fe1da4da645b71459206b2c248333;hpb=37cca72e6c973b77b5d11dcf721ae050edc23586;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index 1c96524d..2fe4e790 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1692,8 +1692,6 @@ int check_port(char *name) { fprintf(stderr, "Warning: could not bind to port 655. "); - srand(time(NULL)); - for(int i = 0; i < 100; i++) { int port = 0x1000 + (rand() & 0x7fff); if(try_bind(port)) { @@ -2376,6 +2374,7 @@ int main(int argc, char *argv[]) { return 0; } + srand(time(NULL)); crypto_init(); tty = isatty(0) && isatty(1);