PPP: set phase to establish before starting LCP

PPP is currently in initialize phase until authentication is started
or until we start IPCP negotiation.

It works, because PPP states are mostly used for user information, most
state are actually useless for PPP itself. Being in initialize state
while PPP is started is not very consistent, switch to establish phase
before starting LCP.
This commit is contained in:
Sylvain Rochet 2016-08-04 23:43:46 +02:00
parent 9b47b6393b
commit 01561b26ef

View File

@ -730,6 +730,7 @@ void ppp_start(ppp_pcb *pcb) {
#endif /* VJ_SUPPORT && LWIP_TCP */
/* Start protocol */
new_phase(pcb, PPP_PHASE_ESTABLISH);
lcp_open(pcb);
lcp_lowerup(pcb);
PPPDEBUG(LOG_DEBUG, ("ppp_start[%d]: finished\n", pcb->netif->num));