Paul Gofman : ntdll: Compute checksum for ICMP over SOCK_DGRAM IP header.
Alexandre Julliard
julliard at winehq.org
Mon Jul 18 15:44:45 CDT 2022
Module: wine
Branch: master
Commit: da1b7cf414dcd776421cec2f7aee732a6f0eb5af
URL: https://gitlab.winehq.org/wine/wine/-/commit/da1b7cf414dcd776421cec2f7aee732a6f0eb5af
Author: Paul Gofman <pgofman at codeweavers.com>
Date: Tue Jul 5 18:06:21 2022 -0500
ntdll: Compute checksum for ICMP over SOCK_DGRAM IP header.
---
dlls/ntdll/unix/socket.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c
index e938eb9b627..18ff23a7399 100644
--- a/dlls/ntdll/unix/socket.c
+++ b/dlls/ntdll/unix/socket.c
@@ -711,6 +711,8 @@ static ssize_t fixup_icmp_over_dgram( struct msghdr *hdr, union unix_sockaddr *u
icmp_h->checksum = chksum( (BYTE *)icmp_h, recv_len - sizeof(ip_h) );
}
}
+ ip_h.checksum = 0;
+ ip_h.checksum = chksum( (BYTE *)&ip_h, sizeof(ip_h) );
memcpy( buf, &ip_h, min( sizeof(ip_h), buf_len ));
return recv_len;
More information about the wine-cvs
mailing list