warp-vpn

point to point VPN implementation
git clone git://git.2f30.org/warp-vpn
Log | Files | Refs | README

commit 474926f99e72d2ab666426ae76e8410cc80678a0
parent 642680230882d80948d6dbcb885777bd3ae420fa
Author: sin <sin@2f30.org>
Date:   Wed, 13 Apr 2016 17:43:26 +0100

increase auth timeout to 10s

Diffstat:
Mauth.c | 4++--
Mstun.h | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/auth.c b/auth.c @@ -25,7 +25,7 @@ challenge(int netfd) pfd[0].fd = netfd; pfd[0].events = POLLIN; for (;;) { - ret = poll(pfd, 1, AUTHTIMEO); + ret = poll(pfd, 1, AUTHTIMEO * 1000); if (ret < 0) { logwarn("poll failed"); return -1; @@ -62,7 +62,7 @@ response(int netfd) pfd[0].fd = netfd; pfd[0].events = POLLIN; for (;;) { - ret = poll(pfd, 1, AUTHTIMEO); + ret = poll(pfd, 1, AUTHTIMEO * 1000); if (ret < 0) { logwarn("poll failed"); return -1; diff --git a/stun.h b/stun.h @@ -4,8 +4,8 @@ #include <stdint.h> #define NOPRIVUSER "nobody" -#define AUTHTIMEO 250 /* in milliseconds */ -#define RECONNECTTIMEO 60 /* in seconds */ +#define AUTHTIMEO 10 /* in seconds */ +#define RECONNECTTIMEO 60 /* in seconds */ #define HDRLEN 2 #define MAXPAYLOADLEN 1424 #define NROUNDS 100000