summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-10-17 12:28:02 +0000
committerbrian <brian@FreeBSD.org>1998-10-17 12:28:02 +0000
commit7e1a7c6a69c3823f2a94156e335bb09052e58275 (patch)
treec75cf65bf882751d882db92bf0e11b8c8552520c /usr.sbin/ppp/lcp.c
parent7689451b978b08145c88ae3a8f5fc07fdfaee5f7 (diff)
downloadFreeBSD-src-7e1a7c6a69c3823f2a94156e335bb09052e58275.zip
FreeBSD-src-7e1a7c6a69c3823f2a94156e335bb09052e58275.tar.gz
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>
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r--usr.sbin/ppp/lcp.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index 9591aef..462b81f 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -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:
OpenPOWER on IntegriCloud