diff options
author | brian <brian@FreeBSD.org> | 1999-05-14 09:36:06 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-05-14 09:36:06 +0000 |
commit | 9cb58fe295c0f1aa707a8ea41924292dae58776b (patch) | |
tree | 89d93e1423aa7e3a760e1e83eb2d77514922e412 /usr.sbin/ppp/fsm.c | |
parent | c9568142723fb3671c8a8e7d21d6274a2ef01c58 (diff) | |
download | FreeBSD-src-9cb58fe295c0f1aa707a8ea41924292dae58776b.zip FreeBSD-src-9cb58fe295c0f1aa707a8ea41924292dae58776b.tar.gz |
Handle LCP echo reqs properly again (broken with the
layering changes).
Diffstat (limited to 'usr.sbin/ppp/fsm.c')
-rw-r--r-- | usr.sbin/ppp/fsm.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c index 618dd221..034d971 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.42 1999/05/08 11:06:35 brian Exp $ + * $Id: fsm.c,v 1.43 1999/05/09 20:02:18 brian Exp $ * * TODO: */ @@ -900,23 +900,9 @@ FsmRecvEchoReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp) static void FsmRecvEchoRep(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp) { - struct lcp *lcp = fsm2lcp(fp); - u_int32_t magic; - - if (lcp && mbuf_Length(bp) >= 4) { - mbuf_Read(bp, &magic, 4); - magic = ntohl(magic); - /* Tolerate echo replies with either magic number */ - if (magic != 0 && magic != lcp->his_magic && magic != lcp->want_magic) { - log_Printf(LogWARN, "%s: RecvEchoRep: Bad magic: expected 0x%08x," - " got 0x%08x\n", fp->link->name, lcp->his_magic, magic); - /* - * XXX: We should send terminate request. But poor implementations may - * die as a result. - */ - } + if (fsm2lcp(fp)) bp = lqr_RecvEcho(fp, bp); - } + mbuf_Free(bp); } |