diff options
author | brian <brian@FreeBSD.org> | 1999-02-26 21:28:14 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-02-26 21:28:14 +0000 |
commit | ee13d15d8f4dbbc16f743a3690a6e495279d5559 (patch) | |
tree | c5807a2099a7111ab5ef9d2ea6aee114863663ec /usr.sbin/ppp/auth.c | |
parent | 7810a0ea5a45f6d62932ef2f65c9127f4683098e (diff) | |
download | FreeBSD-src-ee13d15d8f4dbbc16f743a3690a6e495279d5559.zip FreeBSD-src-ee13d15d8f4dbbc16f743a3690a6e495279d5559.tar.gz |
Allow control over the number of ConfigREQ & TermREQ attempts
that are made in each of the FSMs (LCP, CCP & IPCP) and the
number of REQs/Challenges for PAP/CHAP by accepting more arguments
in the ``set {c,ip,l}cpretry'' and ``set {ch,p}apretry'' commands.
Change the non-convergence thresholds to 3 times the number of configured
REQ tries (rather than the previous fixed ``10''). We now notice
repeated NAKs and REJs rather than just REQs.
Don't suggest that CHAP 0x05 isn't supported when it's not configured.
Fix some bugs that expose themselves with smaller numbers of retries:
o Handle instantaneous disconnects (set device /dev/null) correctly
by stopping all fsm timers in fsm2initial.
o Don't forget to uu_unlock() devices that are files but are not
ttys (set device /dev/zero).
Fix a *HORRENDOUS* bug in RFC1661 (already fixed for an Open event in state
``Closed''):
According to the state transition table, a RCR+ or RCR- received in
the ``Stopped'' state are supposed to InitRestartCounter, SendConfigReq
and SendConfig{Ack,Nak}. However, in ``Stopped'', we haven't yet
done a TLS (or the last thing we did is a TLF). We must therefore
do the TLS at this point !
This was never noticed before because LCP and CCP used not use
LayerStart() for anything interesting, and IPCP tends to go into
Stopped then get a Down because of an LCP RTR rather than getting a
RCR again.
Diffstat (limited to 'usr.sbin/ppp/auth.c')
-rw-r--r-- | usr.sbin/ppp/auth.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c index d67aeda..2373289 100644 --- a/usr.sbin/ppp/auth.c +++ b/usr.sbin/ppp/auth.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: auth.c,v 1.40 1999/02/19 10:48:42 brian Exp $ + * $Id: auth.c,v 1.41 1999/02/20 01:12:45 brian Exp $ * * TODO: * o Implement check against with registered IP addresses. @@ -290,7 +290,9 @@ auth_Init(struct authinfo *authp, struct physical *p, auth_func req, auth_func success, auth_func failure) { memset(authp, '\0', sizeof(struct authinfo)); - authp->cfg.fsmretry = DEF_FSMRETRY; + authp->cfg.fsm.timeout = DEF_FSMRETRY; + authp->cfg.fsm.maxreq = DEF_FSMAUTHTRIES; + authp->cfg.fsm.maxtrm = 0; /* not used */ authp->fn.req = req; authp->fn.success = success; authp->fn.failure = failure; @@ -303,9 +305,9 @@ auth_StartReq(struct authinfo *authp) timer_Stop(&authp->authtimer); authp->authtimer.func = AuthTimeout; authp->authtimer.name = "auth"; - authp->authtimer.load = authp->cfg.fsmretry * SECTICKS; + authp->authtimer.load = authp->cfg.fsm.timeout * SECTICKS; authp->authtimer.arg = (void *)authp; - authp->retry = 3; + authp->retry = authp->cfg.fsm.maxreq; authp->id = 1; (*authp->fn.req)(authp); timer_Start(&authp->authtimer); |