diff options
| author | mycroft <mycroft@NetBSD.org> | 1995-03-21 19:32:13 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 1995-03-21 19:32:13 +0000 |
| commit | cef03fb4ddfe697c2be169edadb4bf2aebde83a7 (patch) | |
| tree | afa408dea69236cf15cf5df927988d1099b61752 | |
| parent | be82a25869f2ad11cadd16ca1b9b295b67d19f6f (diff) | |
Fix length of LCP echo and echo reply.
| -rw-r--r-- | usr.sbin/pppd/lcp.c | 8 | ||||
| -rw-r--r-- | usr.sbin/pppd/pppd/lcp.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/pppd/lcp.c b/usr.sbin/pppd/lcp.c index 041853ad145..a9423193ad0 100644 --- a/usr.sbin/pppd/lcp.c +++ b/usr.sbin/pppd/lcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: lcp.c,v 1.8 1994/06/28 04:38:40 paulus Exp $"; +static char rcsid[] = "$Id: lcp.c,v 1.9 1995/03/21 19:32:13 mycroft Exp $"; #endif /* @@ -278,8 +278,8 @@ lcp_extcode(f, code, id, inp, len) LCPDEBUG((LOG_INFO, "lcp: Echo-Request, Rcvd id %d", id)); magp = inp; PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp); - if (len < CILEN_LONG) - len = CILEN_LONG; + if (len < CILEN_LONG - CILEN_VOID) + len = CILEN_LONG - CILEN_VOID; fsm_sdata(f, ECHOREP, id, inp, len); break; @@ -1525,7 +1525,7 @@ lcp_received_echo_reply (f, id, inp, len) u_long magic; /* Check the magic number - don't count replies from ourselves. */ - if (len < CILEN_LONG) + if (len < CILEN_LONG - CILEN_VOID) return; GETLONG(magic, inp); if (lcp_gotoptions[f->unit].neg_magicnumber diff --git a/usr.sbin/pppd/pppd/lcp.c b/usr.sbin/pppd/pppd/lcp.c index 041853ad145..a9423193ad0 100644 --- a/usr.sbin/pppd/pppd/lcp.c +++ b/usr.sbin/pppd/pppd/lcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: lcp.c,v 1.8 1994/06/28 04:38:40 paulus Exp $"; +static char rcsid[] = "$Id: lcp.c,v 1.9 1995/03/21 19:32:13 mycroft Exp $"; #endif /* @@ -278,8 +278,8 @@ lcp_extcode(f, code, id, inp, len) LCPDEBUG((LOG_INFO, "lcp: Echo-Request, Rcvd id %d", id)); magp = inp; PUTLONG(lcp_gotoptions[f->unit].magicnumber, magp); - if (len < CILEN_LONG) - len = CILEN_LONG; + if (len < CILEN_LONG - CILEN_VOID) + len = CILEN_LONG - CILEN_VOID; fsm_sdata(f, ECHOREP, id, inp, len); break; @@ -1525,7 +1525,7 @@ lcp_received_echo_reply (f, id, inp, len) u_long magic; /* Check the magic number - don't count replies from ourselves. */ - if (len < CILEN_LONG) + if (len < CILEN_LONG - CILEN_VOID) return; GETLONG(magic, inp); if (lcp_gotoptions[f->unit].neg_magicnumber |
