From a8758df1a907bfb3c3cdbd5451d1ef46cb637d23 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Fri, 16 Sep 1994 02:15:37 +0000 Subject: [PATCH] set receive characteristics when we send an ack so we don't miss stuff immediately following their ack --- pppd/lcp.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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); + } } -- 2.39.2