summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/cbcp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-02-26 21:28:14 +0000
committerbrian <brian@FreeBSD.org>1999-02-26 21:28:14 +0000
commitee13d15d8f4dbbc16f743a3690a6e495279d5559 (patch)
treec5807a2099a7111ab5ef9d2ea6aee114863663ec /usr.sbin/ppp/cbcp.c
parent7810a0ea5a45f6d62932ef2f65c9127f4683098e (diff)
downloadFreeBSD-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/cbcp.c')
-rw-r--r--usr.sbin/ppp/cbcp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/cbcp.c b/usr.sbin/ppp/cbcp.c
index 9433baf..446f464 100644
--- a/usr.sbin/ppp/cbcp.c
+++ b/usr.sbin/ppp/cbcp.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cbcp.c,v 1.8 1999/01/19 22:15:25 brian Exp $
+ * $Id: cbcp.c,v 1.9 1999/01/28 01:56:30 brian Exp $
*/
#include <sys/param.h>
@@ -327,7 +327,7 @@ cbcp_Up(struct cbcp *cbcp)
} else
cbcp->fsm.type = CBCP_CLIENTNUM;
cbcp_NewPhase(cbcp, CBCP_STOPPED); /* Wait for a REQ */
- cbcp_StartTimer(cbcp, cbcp->fsm.delay * DEF_REQs);
+ cbcp_StartTimer(cbcp, cbcp->fsm.delay * DEF_FSMTRIES);
} else {
if (*cbcp->fsm.phone == '\0')
cbcp->fsm.type = CBCP_NONUM;
@@ -338,7 +338,7 @@ cbcp_Up(struct cbcp *cbcp)
cbcp->fsm.type = CBCP_LISTNUM;
else
cbcp->fsm.type = CBCP_SERVERNUM;
- cbcp->fsm.restart = DEF_REQs;
+ cbcp->fsm.restart = DEF_FSMTRIES;
cbcp_SendReq(cbcp);
}
}
@@ -635,7 +635,7 @@ cbcp_Input(struct physical *p, struct mbuf *bp)
if (cbcp->fsm.state == CBCP_STOPPED || cbcp->fsm.state == CBCP_RESPSENT) {
timer_Stop(&cbcp->fsm.timer);
if (cbcp_AdjustResponse(cbcp, data)) {
- cbcp->fsm.restart = DEF_REQs;
+ cbcp->fsm.restart = DEF_FSMTRIES;
cbcp->fsm.id = head->id;
cbcp_SendResponse(cbcp);
} else
@@ -661,7 +661,7 @@ cbcp_Input(struct physical *p, struct mbuf *bp)
break;
case CBCP_ACTION_ACK:
- cbcp->fsm.restart = DEF_REQs;
+ cbcp->fsm.restart = DEF_FSMTRIES;
cbcp_SendAck(cbcp);
if (cbcp->fsm.type == CBCP_NONUM) {
/*
OpenPOWER on IntegriCloud