Эх сурвалжийг харах

PPP: set disconnect state before closing link protocol in ppp_close

If LCP is not started yet, we are only closing the link protocol, in
this case we have to set the disconnect state ourself because PPP
is not actually started yet.
Sylvain Rochet 9 жил өмнө
parent
commit
282b8a2b6c
1 өөрчлөгдсөн 1 нэмэгдсэн , 0 устгасан
  1. 1 0
      src/netif/ppp/ppp.c

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

@@ -343,6 +343,7 @@ ppp_close(ppp_pcb *pcb, u8_t nocarrier)
 
   /* LCP not open, close link protocol */
   if (pcb->phase < PPP_PHASE_ESTABLISH) {
+    new_phase(pcb, PPP_PHASE_DISCONNECT);
     ppp_link_terminated(pcb);
     return ERR_OK;
   }