Warn that the specific chap protocol isn't supported when
rejecting CHAP because of byte 5. Suggested by: Daniel O'Callaghan <danny@hilink.com.au>
This commit is contained in:
parent
2a6c45c9aa
commit
e377bbf860
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lcp.c,v 1.63 1998/09/04 18:25:59 brian Exp $
|
||||
* $Id: lcp.c,v 1.64 1998/09/09 00:03:09 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Limit data field length by MRU
|
||||
@ -663,13 +663,24 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type,
|
||||
#ifdef HAVE_DES
|
||||
link2physical(fp->link)->dl->chap.using_MSChap = cp[4] == 0x80;
|
||||
#endif
|
||||
} else if (IsAccepted(lcp->cfg.pap)) {
|
||||
*dec->nakend++ = *cp;
|
||||
*dec->nakend++ = 4;
|
||||
*dec->nakend++ = (unsigned char) (PROTO_PAP >> 8);
|
||||
*dec->nakend++ = (unsigned char) PROTO_PAP;
|
||||
} else
|
||||
goto reqreject;
|
||||
} else {
|
||||
if (IsAccepted(lcp->cfg.chap)) {
|
||||
#ifndef HAVE_DES
|
||||
if (cp[4] == 0x80)
|
||||
log_Printf(LogWARN, "Chap 0x80 not available without DES\n");
|
||||
else
|
||||
#endif
|
||||
log_Printf(LogWARN, "Chap 0x%02x not supported\n",
|
||||
(unsigned)cp[4]);
|
||||
}
|
||||
if (IsAccepted(lcp->cfg.pap)) {
|
||||
*dec->nakend++ = *cp;
|
||||
*dec->nakend++ = 4;
|
||||
*dec->nakend++ = (unsigned char) (PROTO_PAP >> 8);
|
||||
*dec->nakend++ = (unsigned char) PROTO_PAP;
|
||||
} else
|
||||
goto reqreject;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user