X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Flcp.c;h=dde1381abae4c95ca89d662f36da3b002950f913;hb=0d3f05cc3d0a1cf631778296065ce9c158dd9c0e;hp=cf2f46d32c2106599e10b49ba14ba9a829ed072a;hpb=14b5af09f0a70c5f6e6a3d2de11e578616a2ac85;p=ppp.git diff --git a/pppd/lcp.c b/pppd/lcp.c index cf2f46d..dde1381 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -40,7 +40,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: lcp.c,v 1.68 2003/06/11 23:50:53 paulus Exp $" +#define RCSID "$Id: lcp.c,v 1.71 2004/10/31 22:23:18 paulus Exp $" /* * TODO: @@ -53,7 +53,7 @@ #include "pppd.h" #include "fsm.h" #include "lcp.h" -#include "chap.h" +#include "chap-new.h" #include "magic.h" static const char rcsid[] = RCSID; @@ -359,7 +359,7 @@ lcp_init(unit) ao->mru = MAXMRU; ao->neg_asyncmap = 1; ao->neg_chap = 1; - ao->chap_mdtype = MDTYPE_ALL; + ao->chap_mdtype = chap_mdtype_all; ao->neg_upap = 1; ao->neg_eap = 1; ao->neg_magicnumber = 1; @@ -1220,7 +1220,7 @@ lcp_nakci(f, p, len) * An option we don't recognize represents the peer asking to * negotiate some option we don't support, so ignore it. */ - while (len > CILEN_VOID) { + while (len >= CILEN_VOID) { GETCHAR(citype, p); GETCHAR(cilen, p); if (cilen < CILEN_VOID || (len -= cilen) < 0) @@ -1670,7 +1670,7 @@ lcp_reqci(f, inp, lenp, reject_if_disagree) if (ao->neg_chap) { PUTCHAR(CILEN_CHAP, nakp); PUTSHORT(PPP_CHAP, nakp); - PUTCHAR(ao->chap_mdtype, nakp); + PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakp); } else { PUTCHAR(CILEN_SHORT, nakp); PUTSHORT(PPP_PAP, nakp); @@ -2038,7 +2038,7 @@ lcp_printpkt(p, plen, printer, arg) printer(arg, "chap"); if (p < optend) { switch (*p) { - case CHAP_DIGEST_MD5: + case CHAP_MD5: printer(arg, " MD5"); ++p; break;