From 31732631fc932e68344ead6f0b6488a9d9faf85c Mon Sep 17 00:00:00 2001 From: Stephan Linz Date: Wed, 20 Jan 2016 21:55:37 +0100 Subject: [PATCH] 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 [gradator@gradator.net: improved messages] Signed-off-by: Sylvain Rochet --- src/netif/ppp/ppp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 0ce4f9ed..aecd7a1c 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -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 */ }