diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c index 97a36fba8372..4aa773bc3398 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.42 1999/02/06 02:54:44 brian Exp $ + * $Id: ccp.c,v 1.43 1999/02/26 21:28:07 brian Exp $ * * TODO: * o Support other compression protocols @@ -548,17 +548,17 @@ CcpRecvResetAck(struct fsm *fp, u_char id) if (ccp->reset_sent != -1) { if (id != ccp->reset_sent) { - log_Printf(LogWARN, "CCP: %s: Incorrect ResetAck (id %d, not %d)" + log_Printf(LogCCP, "%s: Incorrect ResetAck (id %d, not %d)" " ignored\n", fp->link->name, id, ccp->reset_sent); return; } /* Whaddaya know - a correct reset ack */ } else if (id == ccp->last_reset) log_Printf(LogCCP, "%s: Duplicate ResetAck (resetting again)\n", - fp->link->name); + fp->link->name); else { - log_Printf(LogWARN, "CCP: %s: Unexpected ResetAck (id %d) ignored\n", - fp->link->name, id); + log_Printf(LogCCP, "%s: Unexpected ResetAck (id %d) ignored\n", + fp->link->name, id); return; } diff --git a/usr.sbin/ppp/deflate.c b/usr.sbin/ppp/deflate.c index 4b0c930e1f07..d19d93cb1e02 100644 --- a/usr.sbin/ppp/deflate.c +++ b/usr.sbin/ppp/deflate.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: deflate.c,v 1.10 1998/06/16 19:40:36 brian Exp $ + * $Id: deflate.c,v 1.11 1998/08/07 18:42:48 brian Exp $ */ #include @@ -222,7 +222,7 @@ DeflateInput(void *v, struct ccp *ccp, u_short *proto, struct mbuf *mi) */ state->seqno = seq; else { - log_Printf(LogWARN, "DeflateInput: Seq error: Got %d, expected %d\n", + log_Printf(LogCCP, "DeflateInput: Seq error: Got %d, expected %d\n", seq, state->seqno); mbuf_Free(mi_head); ccp_SendResetReq(&ccp->fsm); @@ -258,7 +258,7 @@ DeflateInput(void *v, struct ccp *ccp, u_short *proto, struct mbuf *mi) if ((res = inflate(&state->cx, flush)) != Z_OK) { if (res == Z_STREAM_END) break; /* Done */ - log_Printf(LogWARN, "DeflateInput: inflate returned %d (%s)\n", + log_Printf(LogCCP, "DeflateInput: inflate returned %d (%s)\n", res, state->cx.msg ? state->cx.msg : ""); mbuf_Free(mo_head); mbuf_Free(mi); @@ -302,7 +302,7 @@ DeflateInput(void *v, struct ccp *ccp, u_short *proto, struct mbuf *mi) mbuf_Free(mi); if (first) { - log_Printf(LogWARN, "DeflateInput: Length error\n"); + log_Printf(LogCCP, "DeflateInput: Length error\n"); mbuf_Free(mo_head); ccp_SendResetReq(&ccp->fsm); return NULL; @@ -383,9 +383,9 @@ DeflateDictSetup(void *v, struct ccp *ccp, u_short proto, struct mbuf *mi) break; /* Done */ if (expect_error && res == Z_BUF_ERROR) break; - log_Printf(LogERROR, "DeflateDictSetup: inflate returned %d (%s)\n", + log_Printf(LogCCP, "DeflateDictSetup: inflate returned %d (%s)\n", res, state->cx.msg ? state->cx.msg : ""); - log_Printf(LogERROR, "DeflateDictSetup: avail_in %d, avail_out %d\n", + log_Printf(LogCCP, "DeflateDictSetup: avail_in %d, avail_out %d\n", state->cx.avail_in, state->cx.avail_out); ccp_SendResetReq(&ccp->fsm); mbuf_FreeSeg(mi_head); /* lose our allocated ``head'' buf */ diff --git a/usr.sbin/ppp/pred.c b/usr.sbin/ppp/pred.c index dcf8b8b8b4a1..b910f4c93667 100644 --- a/usr.sbin/ppp/pred.c +++ b/usr.sbin/ppp/pred.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pred.c,v 1.21 1998/05/21 21:47:53 brian Exp $ + * $Id: pred.c,v 1.22 1998/08/07 18:42:50 brian Exp $ */ #include @@ -43,6 +43,8 @@ #include "hdlc.h" #include "lcp.h" #include "ccp.h" +#include "throughput.h" +#include "link.h" #include "pred.h" /* The following hash code is the heart of the algorithm: @@ -232,8 +234,8 @@ Pred1Input(void *v, struct ccp *ccp, u_short *proto, struct mbuf *bp) ccp->compin += olen; len &= 0x7fff; if (len != len1) { /* Error is detected. Send reset request */ - log_Printf(LogCCP, "Pred1: Length error\n"); - ccp_SendResetReq(&ccp->fsm); + log_Printf(LogCCP, "Pred1: Length error (got %d, not %d)\n", len1, len); + fsm_Reopen(&ccp->fsm); mbuf_Free(bp); mbuf_Free(wp); return NULL; @@ -269,8 +271,8 @@ Pred1Input(void *v, struct ccp *ccp, u_short *proto, struct mbuf *bp) mbuf_Free(bp); return wp; } else { - log_DumpBp(LogHDLC, "Bad FCS", wp); - ccp_SendResetReq(&ccp->fsm); + log_Printf(LogCCP, "%s: Bad CRC-16\n", ccp->fsm.link->name); + fsm_Reopen(&ccp->fsm); mbuf_Free(wp); } mbuf_Free(bp);