PPP: CCP: add error debug messages for dropped packets due to missing transmit or receive CCP method

It might be difficult to investigate the reason of dropped packets when
there is no debug notification of what is happening, thus, add error
debug messages for dropped packets due to missing transmit or receive
CCP method.

Signed-off-by: Stephan Linz <linz@li-pro.net>
[gradator@gradator.net: improved messages]
Signed-off-by: Sylvain Rochet <gradator@gradator.net>
This commit is contained in:
Stephan Linz 2016-01-20 21:55:37 +01:00 committed by Sylvain Rochet
parent c4d78e6422
commit 31732631fc

View File

@ -527,6 +527,7 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc
return err;
#endif /* MPPE_SUPPORT */
default:
PPPDEBUG(LOG_ERR, ("ppp_netif_output[%d]: bad CCP transmit method\n", pcb->netif->num));
goto err_rte_drop; /* Cannot really happen, we only negotiate what we are able to do */
}
#endif /* CCP_SUPPORT */
@ -780,6 +781,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
break;
#endif /* MPPE_SUPPORT */
default:
PPPDEBUG(LOG_ERR, ("ppp_input[%d]: bad CCP receive method\n", pcb->netif->num));
goto drop; /* Cannot really happen, we only negotiate what we are able to do */
}