]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/lcp.c
Add installcheck targets to keep the autobuilder happy
[ppp.git] / pppd / lcp.c
index 88f43db1b66175d2b2cb8b80c56c6a97bb391b01..dde1381abae4c95ca89d662f36da3b002950f913 100644 (file)
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: lcp.c,v 1.69 2003/06/11 23:56:26 paulus Exp $"
+#define RCSID  "$Id: lcp.c,v 1.71 2004/10/31 22:23:18 paulus Exp $"
 
 /*
  * TODO:
@@ -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);