diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-04-04 21:17:39 +0200 |
---|---|---|
committer | Petr Vorel <pvorel@suse.cz> | 2024-04-19 19:25:27 +0200 |
commit | bacf1b7bb8555c407d065e97015319abef2a742d (patch) | |
tree | 5e91d9a42cf634fad8dfd735b41fc4b86fa1b721 | |
parent | a53fce8f34fd13dd79f123a3b1ee2d292ad8abb7 (diff) | |
download | iputils-upstream-master.tar.gz |
ping: fix IPv4 checksum check always succeeding once againupstream-master
This issue was fixed once already in commit bff65fbb6f73
("fix checksum always success in IPv4 ping."), but was reverted
shortly after, likely due to a botched rebase.
Fix this issue again, so ping correctly reports checksum mismatches
in ICMP ECHO replies.
This time it was found with barebox v2024.03.0 (or older) which has
broken checksum on a Raspberry Pi 3b and ping its network interface
(checksum mismatch verified by Wireshark).
Closes: https://github.com/iputils/iputils/pull/534
Fixes: 8b8686794f69 ("warnings: remove variable shadowing")
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
-rw-r--r-- | ping/ping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ping/ping.c b/ping/ping.c index d0803fe..1a3e52c 100644 --- a/ping/ping.c +++ b/ping/ping.c @@ -1654,7 +1654,7 @@ int ping4_parse_reply(struct ping_rts *rts, struct socket_st *sock, wrong_source = 1; if (gather_statistics(rts, (uint8_t *)icp, sizeof(*icp), cc, ntohs(icp->un.echo.sequence), - reply_ttl, 0, tv, pr_addr(rts, from, sizeof *from), + reply_ttl, csfailed, tv, pr_addr(rts, from, sizeof *from), pr_echo_reply, rts->multicast, wrong_source)) { fflush(stdout); return 0; |