Make windows tracert work: needs ICMP time exceeded sent for ICMP echo packets

This commit is contained in:
adamdunkels 2008-02-07 01:33:47 +00:00
parent a105e1a40c
commit 245558fd56

View file

@ -30,7 +30,7 @@
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
* $Id: uip-fw.c,v 1.9 2008/01/24 23:07:37 adamdunkels Exp $ * $Id: uip-fw.c,v 1.10 2008/02/07 01:33:47 adamdunkels Exp $
*/ */
/** /**
* \addtogroup uip * \addtogroup uip
@ -227,8 +227,9 @@ static void
time_exceeded(void) time_exceeded(void)
{ {
/* We don't send out ICMP errors for ICMP messages. */ /* We don't send out ICMP errors for ICMP messages (unless they are pings). */
if(ICMPBUF->proto == UIP_PROTO_ICMP) { if(ICMPBUF->proto == UIP_PROTO_ICMP &&
ICMPBUF->type != ICMP_ECHO) {
uip_len = 0; uip_len = 0;
return; return;
} }