]> git.ozlabs.org Git - ppp.git/commit
pppd: Terminate correctly if lcp_lowerup delayed calling fsm_lowerup
authorPaul Mackerras <paulus@samba.org>
Sun, 7 Mar 2010 04:21:38 +0000 (15:21 +1100)
committerPaul Mackerras <paulus@samba.org>
Sun, 7 Mar 2010 04:21:38 +0000 (15:21 +1100)
commit3eb9e810cfa515543655659b72dde30c54fea0a5
tree93de7698680e6a9905b37c6bca18ff18558626cf
parent406215672cfadc03017341fe03802d1c7294b903
pppd: Terminate correctly if lcp_lowerup delayed calling fsm_lowerup

Cameron Hutchison noticed that if pppd gets asked to terminate the
link in the period between when lcp_lowerup() is called and when
fsm_lowerup() is called from lcp_delayed_up() (i.e. when listen_time
is non-zero), pppd never exits.

The reason is that lcp_close() doesn't handle the delayed-up case
properly.  Since the FSM is still in STOPPED state, we don't call
lcp_finished() and therefore never exit the main event loop.

This fixes it by handling the delayed-up case in lcp_close() as if
we had done the lowerup but the OPT_SILENT bit was set.  We use the
silent case because we don't want to actually send a configure-request
at this point.

Signed-off-by: Paul Mackerras <paulus@samba.org>
pppd/lcp.c