From 7c4377af0e8a7c8b9b0b9d8b1b8eb484fb067e95 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sat, 16 Jun 2007 11:23:26 +0000 Subject: [PATCH] Added debug output for icmp_input if ip_output_if worked or not. --- src/core/ipv4/icmp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/ipv4/icmp.c b/src/core/ipv4/icmp.c index 00b9e1e9..8fb07715 100644 --- a/src/core/ipv4/icmp.c +++ b/src/core/ipv4/icmp.c @@ -154,11 +154,16 @@ icmp_input(struct pbuf *p, struct netif *inp) /* increase number of echo replies attempted to send */ snmp_inc_icmpoutechoreps(); - if(pbuf_header(p, hlen)) + if(pbuf_header(p, hlen)) { LWIP_ASSERT("Can't move over header in packet", 0); - else - ip_output_if(p, &(iphdr->src), IP_HDRINCL, + } else { + err_t ret; + ret = ip_output_if(p, &(iphdr->src), IP_HDRINCL, ICMP_TTL, 0, IP_PROTO_ICMP, inp); + if (ret != ERR_OK) { + LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ip_output_if returned an error: %c.\n", ret)); + } + } break; default: LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n",