diff options
author | Kozlov Dmitry <dima@server> | 2010-10-05 14:18:52 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-10-05 14:18:52 +0400 |
commit | 7f16563bd5a4ef21b970e8dcbab0e5cbe02bfe97 (patch) | |
tree | 573a053112cb4c4b0980d0688a2fe63ef79fd1c0 /accel-pptpd/auth | |
parent | c9e6b5f6b41163ed363e2ad0a1fc354607cb402e (diff) | |
download | accel-ppp-7f16563bd5a4ef21b970e8dcbab0e5cbe02bfe97.tar.gz accel-ppp-7f16563bd5a4ef21b970e8dcbab0e5cbe02bfe97.zip |
bug fixes
Diffstat (limited to 'accel-pptpd/auth')
-rw-r--r-- | accel-pptpd/auth/auth_chap_md5.c | 8 | ||||
-rw-r--r-- | accel-pptpd/auth/auth_mschap_v1.c | 10 | ||||
-rw-r--r-- | accel-pptpd/auth/auth_mschap_v2.c | 8 | ||||
-rw-r--r-- | accel-pptpd/auth/auth_pap.c | 4 |
4 files changed, 15 insertions, 15 deletions
diff --git a/accel-pptpd/auth/auth_chap_md5.c b/accel-pptpd/auth/auth_chap_md5.c index ba122958..e0fe2d4e 100644 --- a/accel-pptpd/auth/auth_chap_md5.c +++ b/accel-pptpd/auth/auth_chap_md5.c @@ -31,9 +31,9 @@ #define HDR_LEN (sizeof(struct chap_hdr_t)-2) -static int conf_timeout = 3; +static int conf_timeout = 5; static int conf_interval = 0; -static int conf_max_failure = 2; +static int conf_max_failure = 3; static int urandom_fd; @@ -122,9 +122,9 @@ static int chap_start(struct ppp_t *ppp, struct auth_data_t *auth) d->h.proto=PPP_CHAP; d->h.recv=chap_recv; d->timeout.expire = chap_timeout; - d->timeout.expire_tv.tv_sec = conf_timeout; + d->timeout.period = conf_timeout * 1000; d->interval.expire = chap_restart; - d->interval.expire_tv.tv_sec = conf_interval; + d->interval.period = conf_interval * 1000; ppp_register_chan_handler(ppp,&d->h); diff --git a/accel-pptpd/auth/auth_mschap_v1.c b/accel-pptpd/auth/auth_mschap_v1.c index ac8edd73..203c25ee 100644 --- a/accel-pptpd/auth/auth_mschap_v1.c +++ b/accel-pptpd/auth/auth_mschap_v1.c @@ -34,9 +34,9 @@ #define HDR_LEN (sizeof(struct chap_hdr_t)-2) -static int conf_timeout = 3; +static int conf_timeout = 5; static int conf_interval = 0; -static int conf_max_failure = 2; +static int conf_max_failure = 3; static int urandom_fd; @@ -136,9 +136,9 @@ static int chap_start(struct ppp_t *ppp, struct auth_data_t *auth) d->h.proto=PPP_CHAP; d->h.recv=chap_recv; d->timeout.expire = chap_timeout; - d->timeout.expire_tv.tv_sec = conf_timeout; + d->timeout.period = conf_timeout * 1000; d->interval.expire = chap_restart; - d->interval.expire_tv.tv_sec = conf_interval; + d->interval.period = conf_interval * 1000; ppp_register_chan_handler(ppp,&d->h); @@ -294,7 +294,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h name = _strndup(msg->name,ntohs(msg->hdr.len)-sizeof(*msg)+2); if (!name) { - log_emerg("mschap-v2: out of memory\n"); + log_emerg("mschap-v1: out of memory\n"); if (ad->started) ppp_terminate(ad->ppp, 0); else diff --git a/accel-pptpd/auth/auth_mschap_v2.c b/accel-pptpd/auth/auth_mschap_v2.c index 4b5e9a02..44a67ca5 100644 --- a/accel-pptpd/auth/auth_mschap_v2.c +++ b/accel-pptpd/auth/auth_mschap_v2.c @@ -35,9 +35,9 @@ #define HDR_LEN (sizeof(struct chap_hdr_t)-2) -static int conf_timeout = 3; +static int conf_timeout = 5; static int conf_interval = 0; -static int conf_max_failure = 2; +static int conf_max_failure = 3; static int urandom_fd; @@ -152,9 +152,9 @@ static int chap_start(struct ppp_t *ppp, struct auth_data_t *auth) d->h.proto=PPP_CHAP; d->h.recv=chap_recv; d->timeout.expire = chap_timeout; - d->timeout.expire_tv.tv_sec = conf_timeout; + d->timeout.period = conf_timeout * 1000; d->interval.expire = chap_restart; - d->interval.expire_tv.tv_sec = conf_interval; + d->interval.period = conf_interval * 1000; ppp_register_chan_handler(ppp,&d->h); diff --git a/accel-pptpd/auth/auth_pap.c b/accel-pptpd/auth/auth_pap.c index 42ef66b2..0fd6e7f1 100644 --- a/accel-pptpd/auth/auth_pap.c +++ b/accel-pptpd/auth/auth_pap.c @@ -20,7 +20,7 @@ #define PAP_ACK 2 #define PAP_NAK 3 -static int conf_timeout = 3; +static int conf_timeout = 5; static struct auth_data_t* auth_data_init(struct ppp_t *ppp); static void auth_data_free(struct ppp_t*, struct auth_data_t*); @@ -91,7 +91,7 @@ static int pap_start(struct ppp_t *ppp, struct auth_data_t *auth) d->h.proto = PPP_PAP; d->h.recv = pap_recv; d->timeout.expire = pap_timeout; - d->timeout.expire_tv.tv_sec = conf_timeout; + d->timeout.period = conf_timeout * 1000; triton_timer_add(ppp->ctrl->ctx, &d->timeout, 0); |