aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1995-09-09 13:23:53 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1995-09-09 13:23:53 +0000
commit85c59f05aae33275504ad806699eeb824e032bff (patch)
tree4537b67b9a6645b3a5fe2441f6c2443438535721 /usr.sbin/ppp
parentccf9a17c14e227249fcf3c4ab4e4ad8b41d88790 (diff)
downloadsrc-85c59f05aae33275504ad806699eeb824e032bff.tar.gz
src-85c59f05aae33275504ad806699eeb824e032bff.zip
Be gentle and allow both magic's (the own one and the other side's
one) as a valid answer to an echo request. This makes the log less noisy when connecting to Trumpet Winsock or FreeBSD 2.0.5's pppd. :) Submitted by: melvin@zytek.com (Stephen Melvin)
Notes
Notes: svn path=/head/; revision=10650
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/fsm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c
index 3df063a3973c..8252b237c470 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.2 1995/02/26 12:17:27 amurai Exp $
+ * $Id: fsm.c,v 1.3 1995/05/30 03:50:32 rgrimes Exp $
*
* TODO:
* o Refer loglevel for log output
@@ -689,7 +689,10 @@ struct mbuf *bp;
lp = (u_long *)MBUF_CTOP(bp);
magic = ntohl(*lp);
- if (magic != 0 && magic != LcpInfo.his_magic) {
+/*
+ * Tolerate echo replies with either magic number
+ */
+ if (magic != 0 && magic != LcpInfo.his_magic && magic != LcpInfo.want_magic) {
logprintf("RecvEchoRep: his magic is wrong! expect: %x got: %x\n",
LcpInfo.his_magic, magic);
/*