mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Tone down the log levels (Log{ERROR,WARN} -> LogCCP)
when we've simply missed a packet. When our Predictor1 CRC is wrong (implying we've dropped a packet), don't send a ResetReq(). Instead, send another CCP ConfigReq(). *shrug* My tests show this as being far worse than the ResetReq as we may have further Nak/Rejs etc and we're basically resetting both our incoming and outgoing compression dictionaries, but rfc1978 says the ConfigReq is correct, so we'd better go along...
This commit is contained in:
parent
63a134bc15
commit
a36ca3cc08
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44650
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 <sys/types.h>
|
||||
@ -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 */
|
||||
|
@ -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 <sys/types.h>
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user