diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c index 04b26792978..daa52cd85a0 100644 --- a/usr.sbin/ppp/chat.c +++ b/usr.sbin/ppp/chat.c @@ -154,6 +154,11 @@ chat_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n) else { /* c->state = CHAT_EXPECT; */ c->argptr = &arg_term; + /* + We have to clear the input buffer, because it contains output + from the previous (timed out) command. + */ + c->bufstart = c->bufend; } c->TimedOut = 0; }