mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-21 04:20:48 +00:00
phase must be set to initalize each time we try to reconnect
This commit is contained in:
parent
a84f5d52ff
commit
408a56ffaf
@ -255,7 +255,6 @@ ppp_pcb *ppp_new(void) {
|
||||
#endif /* PPP_DEBUG */
|
||||
IP4_ADDR(&pcb->addrs.netmask, 255,255,255,255);
|
||||
pcb->lcp_loopbackfail = DEFLOOPBACKFAIL;
|
||||
new_phase(pcb, PHASE_INITIALIZE);
|
||||
|
||||
/* default configuration */
|
||||
pcb->settings.usepeerdns = 1;
|
||||
@ -359,6 +358,7 @@ int ppp_over_serial_open(ppp_pcb *pcb, sio_fd_t fd, ppp_link_status_cb_fn link_s
|
||||
* Start the connection and handle incoming events (packet or timeout).
|
||||
*/
|
||||
PPPDEBUG(LOG_INFO, ("ppp_over_serial_open: unit %d: Connecting\n", pcb->num));
|
||||
new_phase(pcb, PHASE_INITIALIZE);
|
||||
ppp_start(pcb);
|
||||
#if PPP_INPROC_OWNTHREAD
|
||||
sys_thread_new(PPP_THREAD_NAME, ppp_input_thread, (void*)&pcb->rx, PPP_THREAD_STACKSIZE, PPP_THREAD_PRIO);
|
||||
@ -417,6 +417,7 @@ int ppp_over_ethernet_open(ppp_pcb *pcb, struct netif *ethif, const char *servic
|
||||
return PPPERR_OPEN;
|
||||
}
|
||||
|
||||
new_phase(pcb, PHASE_INITIALIZE);
|
||||
pppoe_connect(pcb->pppoe_sc);
|
||||
return PPPERR_NONE;
|
||||
}
|
||||
@ -1655,6 +1656,7 @@ static void ppp_over_ethernet_link_status_cb(ppp_pcb *pcb, int state) {
|
||||
if(pcb->settings.persist) {
|
||||
if(pcb->link_status_cb)
|
||||
pcb->link_status_cb(pcb, pcb->err_code ? pcb->err_code : pppoe_err_code, pcb->link_status_ctx);
|
||||
new_phase(pcb, PHASE_INITIALIZE);
|
||||
pppoe_connect(pcb->pppoe_sc);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user