X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Flcp.c;h=f215a76d822d4771154d58a5b990f3656f9585fe;hp=eb5f1c51741075947fc3b5b5eaaf06d35dd6ce04;hb=21b99cb2d9d128511c61023374b5bf62997aebc9;hpb=1615280ee6c970215e911325a243288c5e47ea7d diff --git a/pppd/lcp.c b/pppd/lcp.c index eb5f1c5..f215a76 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: lcp.c,v 1.12 1994/09/01 00:24:14 paulus Exp $"; +static char rcsid[] = "$Id: lcp.c,v 1.13 1994/09/16 02:15:37 paulus Exp $"; #endif /* @@ -252,7 +252,23 @@ lcp_input(unit, p, len) u_char *p; int len; { - fsm_input(&lcp_fsm[unit], p, len); + int oldstate; + fsm *f = &lcp_fsm[unit]; + lcp_options *go = &lcp_gotoptions[f->unit]; + + oldstate = f->state; + fsm_input(f, p, len); + if (oldstate == REQSENT && f->state == ACKSENT) { + /* + * The peer will probably send us an ack soon and then + * immediately start sending packets with the negotiated + * options. So as to be ready when that happens, we set + * our receive side to accept packets as negotiated now. + */ + ppp_recv_config(f->unit, MTU, + go->neg_asyncmap? go->asyncmap: 0x00000000, + go->neg_pcompression, go->neg_accompression); + } }