From 282b8a2b6cd9191ba92cee46b887eca8dc4dcf20 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Mon, 8 Aug 2016 11:55:31 +0200 Subject: [PATCH] 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. --- src/netif/ppp/ppp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index a1588931..da5337ee 100644 --- a/src/netif/ppp/ppp.c +++ b/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; }