From 85b853189e59cb58cdd35a7e9e9ec23997fc42db Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 21 Aug 2022 14:29:17 +0200 Subject: user/ethdump: fix icmp checksums --- src/user/app/ethdump/icmp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/user/app') diff --git a/src/user/app/ethdump/icmp.c b/src/user/app/ethdump/icmp.c index e23ab01..0c6a502 100644 --- a/src/user/app/ethdump/icmp.c +++ b/src/user/app/ethdump/icmp.c @@ -27,6 +27,7 @@ void icmp_send(const void *payload, size_t len, struct icmp i) { pkt[Type] = i.type; pkt[Code] = i.code; memcpy(pkt + Payload, payload, len); + nput16(pkt + Checksum, 0); nput16(pkt + Checksum, ip_checksum(pkt, Payload + len)); ipv4_send(pkt, Payload + len, i.ip); free(pkt); -- cgit v1.2.3