mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-28 18:16:13 +00:00
PPP: fix dead phase set too early
When we are disconnecting, we should switch to PPP dead phase at the very end, because this is our final disconnection phase allowing reconnect, therefore we should switch to dead phase after the link protocol finished disconnecting. We are currently switching to dead phase when LCP detected that the link is down, this is obviously wrong. Fix this flaw by continuing in disconnect phase until ppp_link_end is called from link protocol.
This commit is contained in:
parent
5f774270b6
commit
bae67915ab
@ -639,7 +639,6 @@ void link_terminated(ppp_pcb *pcb) {
|
||||
|
||||
lcp_lowerdown(pcb);
|
||||
|
||||
new_phase(pcb, PPP_PHASE_DEAD);
|
||||
ppp_link_terminated(pcb);
|
||||
#if 0
|
||||
/*
|
||||
|
@ -746,6 +746,7 @@ void ppp_link_failed(ppp_pcb *pcb) {
|
||||
/** Called when link is normally down (i.e. it was asked to end) */
|
||||
void ppp_link_end(ppp_pcb *pcb) {
|
||||
PPPDEBUG(LOG_DEBUG, ("ppp_link_end[%d]\n", pcb->netif->num));
|
||||
new_phase(pcb, PPP_PHASE_DEAD);
|
||||
if (pcb->err_code == PPPERR_NONE) {
|
||||
pcb->err_code = PPPERR_CONNECT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user