mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
Fixed bug #21107 (didn't reset IP TTL in ICMP echo replies)
This commit is contained in:
parent
2bdd916b06
commit
0bf32b957d
@ -405,6 +405,9 @@ HISTORY
|
||||
|
||||
++ Bug fixes:
|
||||
|
||||
2007-09-19 Simon Goldschmidt
|
||||
* icmp.c: Fixed bug #21107 (didn't reset IP TTL in ICMP echo replies)
|
||||
|
||||
2007-09-06 Frédéric Bernon
|
||||
* several-files: replace some #include "arch/cc.h" by "lwip/arch.h", or simply remove
|
||||
it as long as "lwip/opt.h" is included before (this one include "lwip/debug.h" which
|
||||
|
@ -163,6 +163,14 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
||||
} else {
|
||||
iecho->chksum += htons(ICMP_ECHO << 8);
|
||||
}
|
||||
|
||||
/* Set the correct TTL and recalculate the header checksum. */
|
||||
IPH_TTL_SET(iphdr, ICMP_TTL);
|
||||
IPH_CHKSUM_SET(iphdr, 0);
|
||||
#if CHECKSUM_GEN_IP
|
||||
IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN));
|
||||
#endif /* CHECKSUM_GEN_IP */
|
||||
|
||||
ICMP_STATS_INC(icmp.xmit);
|
||||
/* increase number of messages attempted to send */
|
||||
snmp_inc_icmpoutmsgs();
|
||||
|
Loading…
Reference in New Issue
Block a user