summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/pred.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-03-11 01:49:15 +0000
committerbrian <brian@FreeBSD.org>1999-03-11 01:49:15 +0000
commite1bfa8246d0e06905f031d831a39c068717a807f (patch)
tree924dca68ca4d843b359e2face7811a7fa509a6f6 /usr.sbin/ppp/pred.c
parent2adbdf81a7b8649a7dd26bade0f7633556308866 (diff)
downloadFreeBSD-src-e1bfa8246d0e06905f031d831a39c068717a807f.zip
FreeBSD-src-e1bfa8246d0e06905f031d831a39c068717a807f.tar.gz
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...
Diffstat (limited to 'usr.sbin/ppp/pred.c')
-rw-r--r--usr.sbin/ppp/pred.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/ppp/pred.c b/usr.sbin/ppp/pred.c
index dcf8b8b..b910f4c 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);
OpenPOWER on IntegriCloud