summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1999-03-01 02:52:20 +0000
committerbrian <brian@cvs.openbsd.org>1999-03-01 02:52:20 +0000
commit4d11982269c313ad2a1023a73edbbc03a8984820 (patch)
treec6c70134617638b17058f4482e19c29cb2e8434a /usr.sbin
parente735ae299c96d42d5318f16557e40836434b4940 (diff)
Comment why we do a TLF when we get a ``Down'' event in state
``closing''. Pointed out by: archie Don't do a TLF when we get a ``Catastrphic Protocol Reject'' event in state ``closed'' or ``stopped''. Pointed out but not suggested by: archie This makes no difference in the current implementation as LcpLayerFinish() does nothing but log the event, but I disagree in principle because it unbalances the TLF/TLS calls which (IMHO) doesn't fit with the intentions of the RFC. Maybe the RFC author had a reason for this. It can only happen in two circumstances: - if LCP has already been negotiated then stopped or closed and we receive a protocol reject, then we must already have done a TLF. Why do one again and stay in the same state ? - if LCP hasn't yet been started and we receive an unsolicted protocol reject, why should we TLF when we haven't done a TLS ?
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/fsm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ppp/fsm.c b/usr.sbin/ppp/ppp/fsm.c
index 35f16f36807..5df2fb146e5 100644
--- a/usr.sbin/ppp/ppp/fsm.c
+++ b/usr.sbin/ppp/ppp/fsm.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: fsm.c,v 1.4 1999/02/26 21:28:22 brian Exp $
+ * $Id: fsm.c,v 1.5 1999/03/01 02:52:19 brian Exp $
*
* TODO:
*/
@@ -302,6 +302,7 @@ fsm_Down(struct fsm *fp)
NewState(fp, ST_INITIAL);
break;
case ST_CLOSING:
+ /* This TLF contradicts the RFC (1661), which ``misses it out'' ! */
(*fp->fn->LayerFinish)(fp);
NewState(fp, ST_INITIAL);
(*fp->parent->LayerFinish)(fp->parent->object, fp);
@@ -841,7 +842,8 @@ FsmRecvProtoRej(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
case PROTO_CCP:
if (fp->proto == PROTO_LCP) {
fp = &fp->link->ccp.fsm;
- (*fp->fn->LayerFinish)(fp);
+ /* Despite the RFC (1661), don't do an out-of-place TLF */
+ /* (*fp->fn->LayerFinish)(fp); */
switch (fp->state) {
case ST_CLOSED:
case ST_CLOSING:
@@ -850,7 +852,8 @@ FsmRecvProtoRej(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp)
NewState(fp, ST_STOPPED);
break;
}
- (*fp->parent->LayerFinish)(fp->parent->object, fp);
+ /* See above */
+ /* (*fp->parent->LayerFinish)(fp->parent->object, fp); */
}
break;
case PROTO_MP: