Commit
this closes #17. When an ICMP echo request with ID 0, sequence 0 and either no or some 0x00 Bytes as payload, the checksum calculation was wrong
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,7 +196,7 @@ icmp_input(struct pbuf *p, struct netif *inp) | |
| ICMPH_TYPE_SET(iecho, ICMP_ER); | ||
| #if CHECKSUM_GEN_ICMP | ||
| /* adjust the checksum */ | ||
| if (iecho->chksum >= PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { | ||
| if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { | ||
| iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tabascoeye
Author
Owner
|
||
| } else { | ||
| iecho->chksum += PP_HTONS(ICMP_ECHO << 8); | ||
|
|
||
Hi all,
Is there any way to recreate the issue in a controlled manner?