diff options
author | brian <brian@FreeBSD.org> | 1999-04-01 11:05:23 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-04-01 11:05:23 +0000 |
commit | fa9cc0ebfb3821fac3240755fae227fa654a37f7 (patch) | |
tree | bb7b4a0f0de511cf604efa8c384b2e16552fa1e0 /usr.sbin/ppp/chap.c | |
parent | c3edb55f8c28c9237cefdb5069a21ff3bea87e11 (diff) | |
download | FreeBSD-src-fa9cc0ebfb3821fac3240755fae227fa654a37f7.zip FreeBSD-src-fa9cc0ebfb3821fac3240755fae227fa654a37f7.tar.gz |
Drop PAP & CHAP packets if we're not in NETWORK or AUTHENTICATE
phase.
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"); |