summaryrefslogtreecommitdiff
path: root/src/user/app
diff options
context:
space:
mode:
authordzwdz2022-08-21 14:29:17 +0200
committerdzwdz2022-08-21 14:29:17 +0200
commit85b853189e59cb58cdd35a7e9e9ec23997fc42db (patch)
treeccf85d07c006f6688c705b7ddacb57a8bc2206dc /src/user/app
parentb372b0c3c86b1744c1620515a7bbe894a390feae (diff)
user/ethdump: fix icmp checksums
Diffstat (limited to 'src/user/app')
-rw-r--r--src/user/app/ethdump/icmp.c1
1 files changed, 1 insertions, 0 deletions
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);