X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Flcp.c;h=7a5ae2f49e7fc9613211d779f4e1246c86ea2b11;hb=b98e5a6bed67f50cdfad054ea6576f59b9a0c482;hp=88f43db1b66175d2b2cb8b80c56c6a97bb391b01;hpb=71d3de90eae52087b405e962ca650b71cec79c67;p=ppp.git diff --git a/pppd/lcp.c b/pppd/lcp.c index 88f43db..7a5ae2f 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.69 2003/06/11 23:56:26 paulus Exp $" +#define RCSID "$Id: lcp.c,v 1.73 2004/11/12 11:42:46 paulus Exp $" /* * TODO: @@ -359,15 +359,12 @@ 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; ao->neg_pcompression = 1; ao->neg_accompression = 1; -#ifdef CBCP_SUPPORT - ao->neg_cbcp = 1; -#endif ao->neg_endpoint = 1; } @@ -401,7 +398,7 @@ lcp_close(unit, reason) { fsm *f = &lcp_fsm[unit]; - if (phase != PHASE_DEAD) + if (phase != PHASE_DEAD && phase != PHASE_MASTER) new_phase(PHASE_TERMINATE); if (f->state == STOPPED && f->flags & (OPT_PASSIVE|OPT_SILENT)) { /* @@ -1220,7 +1217,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 +1667,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);