Răsfoiți Sursa

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.
Sylvain Rochet 9 ani în urmă
părinte
comite
01561b26ef
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      src/netif/ppp/ppp.c

+ 1 - 0
src/netif/ppp/ppp.c

@@ -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));