diff options
Diffstat (limited to 'usr.sbin/ppp/chap.c')
-rw-r--r-- | usr.sbin/ppp/chap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c index fe76ebc..dde8081 100644 --- a/usr.sbin/ppp/chap.c +++ b/usr.sbin/ppp/chap.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: chap.c,v 1.46 1999/02/18 19:45:06 brian Exp $ + * $Id: chap.c,v 1.47 1999/02/20 01:12:45 brian Exp $ * * TODO: */ @@ -543,6 +543,13 @@ chap_Input(struct physical *p, struct mbuf *bp) int lanman; #endif + if (bundle_Phase(p->dl->bundle) != PHASE_NETWORK && + bundle_Phase(p->dl->bundle) != PHASE_AUTHENTICATE) { + log_Printf(LogPHASE, "Unexpected chap input - dropped !\n"); + mbuf_Free(bp); + return; + } + if ((bp = auth_ReadHeader(&chap->auth, bp)) == NULL && ntohs(chap->auth.in.hdr.length) == 0) log_Printf(LogWARN, "Chap Input: Truncated header !\n"); |