summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-09-10 21:33:32 +0000
committerbrian <brian@FreeBSD.org>1997-09-10 21:33:32 +0000
commit49b883a1dd5b5019c848e73206a2e4e81476c5ee (patch)
tree3de8de5bf4eee5d3aaef4b8536e7882b6c6344a1 /usr.sbin/ppp
parentd4697c2a95a093188f9d457064f3a6fc4e97b9ef (diff)
downloadFreeBSD-src-49b883a1dd5b5019c848e73206a2e4e81476c5ee.zip
FreeBSD-src-49b883a1dd5b5019c848e73206a2e4e81476c5ee.tar.gz
o Initialize the PRED1 input queue when we
receive the ResetAck, NOT when we send the ResetReq (as per the rfc). o SILENTLY ignore CCPs that arrive *before* the network phase (as per the rfc). o Check that we've actually negotiated PRED1 before sending PRED1 output. This bug has been around for a *VERY* long time ! We shouldn't need to explicitly disable PRED1 now :-)
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/ccp.c6
-rw-r--r--usr.sbin/ppp/fsm.c3
-rw-r--r--usr.sbin/ppp/hdlc.c8
3 files changed, 10 insertions, 7 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index d42e9bf..f4a3a56 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ccp.c,v 1.14 1997/08/20 23:47:40 brian Exp $
+ * $Id: ccp.c,v 1.15 1997/08/25 00:29:06 brian Exp $
*
* TODO:
* o Support other compression protocols
@@ -130,7 +130,6 @@ CcpSendConfigReq(struct fsm * fp)
void
CcpSendResetReq(struct fsm * fp)
{
- Pred1Init(1); /* Initialize Input part */
LogPrintf(LogCCP, "CcpSendResetReq\n");
FsmOutput(fp, CODE_RESETREQ, fp->reqid, NULL, 0);
}
@@ -258,7 +257,8 @@ CcpInput(struct mbuf * bp)
if (phase == PHASE_NETWORK)
FsmInput(&CcpFsm, bp);
else {
- LogPrintf(LogERROR, "Unexpected CCP in phase %d\n", phase);
+ if (phase > PHASE_NETWORK)
+ LogPrintf(LogERROR, "Unexpected CCP in phase %d\n", phase);
pfree(bp);
}
}
diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c
index c951086..9027f6d0 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.16 1997/08/25 00:29:12 brian Exp $
+ * $Id: fsm.c,v 1.17 1997/08/31 22:59:27 brian Exp $
*
* TODO:
* o Refer loglevel for log output
@@ -711,6 +711,7 @@ void
FsmRecvResetAck(struct fsm * fp, struct fsmheader * lhp, struct mbuf * bp)
{
LogPrintf(fp->LogLevel, "RecvResetAck\n");
+ Pred1Init(1); /* Initialize Input part */
fp->reqid++;
pfree(bp);
}
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c
index e9bb0f3..ddfb199 100644
--- a/usr.sbin/ppp/hdlc.c
+++ b/usr.sbin/ppp/hdlc.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: hdlc.c,v 1.16 1997/06/09 03:27:22 brian Exp $
+ * $Id: hdlc.c,v 1.17 1997/08/25 00:29:13 brian Exp $
*
* TODO:
*/
@@ -152,8 +152,10 @@ HdlcOutput(int pri, u_short proto, struct mbuf * bp)
if ((proto & 0xfff1) == 0x21) { /* Network Layer protocol */
if (CcpFsm.state == ST_OPENED) {
- Pred1Output(pri, proto, bp);
- return;
+ if (CcpInfo.want_proto == PRED1) {
+ Pred1Output(pri, proto, bp);
+ return;
+ }
}
}
if (DEV_IS_SYNC)
OpenPOWER on IntegriCloud