fixed pbuf leaks in ppp_input() in case of packets not expected

This commit is contained in:
Sylvain Rochet 2012-06-07 20:41:21 +02:00
parent a9ac45c5f0
commit 4077422ae2

View File

@ -746,7 +746,7 @@ static void ppp_input(void *arg) {
*/ */
if (protocol != PPP_LCP && lcp_fsm[0].state != OPENED) { if (protocol != PPP_LCP && lcp_fsm[0].state != OPENED) {
dbglog("Discarded non-LCP packet when LCP not open"); dbglog("Discarded non-LCP packet when LCP not open");
return; goto drop;
} }
/* FIXME: add a phase per connection */ /* FIXME: add a phase per connection */
@ -772,7 +772,7 @@ static void ppp_input(void *arg) {
)) { )) {
dbglog("discarding proto 0x%x in phase %d", dbglog("discarding proto 0x%x in phase %d",
protocol, phase); protocol, phase);
return; goto drop;
} }
/* FIXME: should we write protent to do that ? */ /* FIXME: should we write protent to do that ? */