aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-03-11 01:49:15 +0000
committerBrian Somers <brian@FreeBSD.org>1999-03-11 01:49:15 +0000
commita36ca3cc08ac0867f94a6b4ff72e9f594de66ea7 (patch)
tree5ee89b50811bd42e0cebab3e6ea7edf7a429ca2b
parent63a134bc1521292364f6a1248147737dba11aa36 (diff)
downloadsrc-a36ca3cc08ac0867f94a6b4ff72e9f594de66ea7.tar.gz
src-a36ca3cc08ac0867f94a6b4ff72e9f594de66ea7.zip
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...
Notes
Notes: svn path=/head/; revision=44650
-rw-r--r--usr.sbin/ppp/ccp.c10
-rw-r--r--usr.sbin/ppp/deflate.c12
-rw-r--r--usr.sbin/ppp/pred.c12
3 files changed, 18 insertions, 16 deletions
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 <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 */
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 <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);