mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-12 01:14:41 +08:00
Added debug output for icmp_input if ip_output_if worked or not.
This commit is contained in:
parent
f93b8fe377
commit
7c4377af0e
@ -154,11 +154,16 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
|||||||
/* increase number of echo replies attempted to send */
|
/* increase number of echo replies attempted to send */
|
||||||
snmp_inc_icmpoutechoreps();
|
snmp_inc_icmpoutechoreps();
|
||||||
|
|
||||||
if(pbuf_header(p, hlen))
|
if(pbuf_header(p, hlen)) {
|
||||||
LWIP_ASSERT("Can't move over header in packet", 0);
|
LWIP_ASSERT("Can't move over header in packet", 0);
|
||||||
else
|
} else {
|
||||||
ip_output_if(p, &(iphdr->src), IP_HDRINCL,
|
err_t ret;
|
||||||
|
ret = ip_output_if(p, &(iphdr->src), IP_HDRINCL,
|
||||||
ICMP_TTL, 0, IP_PROTO_ICMP, inp);
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n",
|
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user