X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Flcp.c;h=eabdfbabb61bca6083d1ead9fc23f954677a6158;hb=76bb2b14a56e313b06b727d015fcd6f7ba6f789c;hp=442ae227a5143215a863130bc138bc22c4225f17;hpb=f53a48eb9d74db3c71938e114b7f489c339bc003;p=ppp.git diff --git a/pppd/lcp.c b/pppd/lcp.c index 442ae22..eabdfba 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.64 2002/12/04 23:03:32 paulus Exp $" +#define RCSID "$Id: lcp.c,v 1.67 2003/05/09 11:49:46 carlsonj Exp $" /* * TODO: @@ -414,7 +414,7 @@ lcp_close(unit, reason) lcp_finished(f); } else - fsm_close(&lcp_fsm[unit], reason); + fsm_close(f, reason); } @@ -433,9 +433,10 @@ lcp_lowerup(unit) * but accept A/C and protocol compressed packets * if we are going to ask for A/C and protocol compression. */ - ppp_send_config(unit, PPP_MRU, 0xffffffff, 0, 0); - ppp_recv_config(unit, PPP_MRU, (lax_recv? 0: 0xffffffff), - wo->neg_pcompression, wo->neg_accompression); + if (ppp_send_config(unit, PPP_MRU, 0xffffffff, 0, 0) < 0 + || ppp_recv_config(unit, PPP_MRU, (lax_recv? 0: 0xffffffff), + wo->neg_pcompression, wo->neg_accompression) < 0) + return; peer_mru[unit] = PPP_MRU; if (listen_time != 0) { @@ -1602,11 +1603,11 @@ lcp_reqci(f, inp, lenp, reject_if_disagree) } if (!ao->neg_upap) { /* we don't want to do PAP */ orc = CONFNAK; /* NAK it and suggest CHAP or EAP */ + PUTCHAR(CI_AUTHTYPE, nakp); if (ao->neg_eap) { PUTCHAR(CILEN_SHORT, nakp); PUTSHORT(PPP_EAP, nakp); } else { - PUTCHAR(CI_AUTHTYPE, nakp); PUTCHAR(CILEN_CHAP, nakp); PUTSHORT(PPP_CHAP, nakp); PUTCHAR(CHAP_DIGEST(ao->chap_mdtype), nakp);