PPP, MPPE, close current session using lcp_close() if something went wrong

This commit is contained in:
Sylvain Rochet 2015-04-19 02:27:40 +02:00
parent f94efab6c3
commit c8db96705f

View File

@ -131,6 +131,7 @@ mppe_init(ppp_pcb *pcb, ppp_mppe_state *state, u8_t options)
else { else {
PPPDEBUG(LOG_DEBUG, ("%s[%d]: unknown key length\n", debugstr, PPPDEBUG(LOG_DEBUG, ("%s[%d]: unknown key length\n", debugstr,
pcb->netif->num)); pcb->netif->num));
lcp_close(pcb, "MPPE required but peer negotiation failed");
return; return;
} }
if (options & MPPE_OPT_STATEFUL) if (options & MPPE_OPT_STATEFUL)
@ -312,7 +313,7 @@ mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb)
* We don't want to do this for a single or just a few * We don't want to do this for a single or just a few
* instances since it could just be due to packet corruption. * instances since it could just be due to packet corruption.
*/ */
/* FIXME: call lcp_close() here */ lcp_close(pcb, "Too many MPPE errors");
return ERR_BUF; return ERR_BUF;
} }