diff options
author | brian <brian@FreeBSD.org> | 1998-06-30 23:04:17 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-06-30 23:04:17 +0000 |
commit | 079249c72b5c0fb2904b7a7047d32db6093792ee (patch) | |
tree | 42c0587c812526ccf54e9882ce1fc39a80e2f980 /usr.sbin/ppp/fsm.c | |
parent | 805c8719671543e774a7eb330ccd6b2d829a535a (diff) | |
download | FreeBSD-src-079249c72b5c0fb2904b7a7047d32db6093792ee.zip FreeBSD-src-079249c72b5c0fb2904b7a7047d32db6093792ee.tar.gz |
The CCP layer now behaves as follows:
o If we've denied and disabled all compression protocols, stay
in ST_INITIAL and do an LCP protocol reject if we receive any
CCP packets.
o If we've disabled all compression protocols, go to ST_STOPPED
and wait for the other side to ask for something.
o If we've got anything enabled, start REQing as soon as the auth
layer is up.
o If we're in multilink mode, than the link level CCP goes
straight to ST_STOPPED irrespective of what's configured so that
we never try to compress compressed stuff by default.
Diffstat (limited to 'usr.sbin/ppp/fsm.c')
-rw-r--r-- | usr.sbin/ppp/fsm.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c index 289670a..4888e09 100644 --- a/usr.sbin/ppp/fsm.c +++ b/usr.sbin/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.33 1998/06/25 22:33:20 brian Exp $ + * $Id: fsm.c,v 1.34 1998/06/27 23:48:43 brian Exp $ * * TODO: */ @@ -458,6 +458,21 @@ FsmRecvConfigReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp) */ switch (fp->state) { case ST_INITIAL: + if (fp->proto == PROTO_CCP && fp->link->lcp.fsm.state == ST_OPENED) { + /* + * ccp_SetOpenMode() leaves us in initial if we're disabling + * & denying everything. This is a bit smelly, we know that + * ``bp'' really has ``fsmheader'' in front of it, and CCP_PROTO + * in front of that. CCP_PROTO isn't compressed either 'cos it + * doesn't begin with 0x00.... + */ + bp->offset -= sizeof(struct fsmheader) + 2; + bp->cnt += sizeof(struct fsmheader) + 2; + lcp_SendProtoRej(&fp->link->lcp, MBUF_CTOP(bp), bp->cnt); + mbuf_Free(bp); + return; + } + /* Drop through */ case ST_STARTING: log_Printf(fp->LogLevel, "%s: Oops, RCR in %s.\n", fp->link->name, State2Nam(fp->state)); |