On Mon Aug 8 13:20:50 2022 +0000, **** wrote:
Paul Gofman replied on the mailing list: ```
On 8 Aug 2022, at 02:56, Francois Gouget (@fgouget) <wine(a)gitlab.winehq.org> wrote:
���Francois Gouget (@fgouget) commented about dlls/ntdll/unix/socket.c:
+ req->icmp_seq = icmp_h->un.echo.sequence; + if (!(fixup_status = wine_server_call( req ))) + icmp_h->un.echo.id = reply->icmp_id; + else + WARN( "socket_get_fixup_data returned %#x.\n", fixup_status ); + } + SERVER_END_REQ; + + if (!fixup_status) + { + icmp_h->checksum = 0; + 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) ); Isn't the first assignment redundant?
No, it isn���t. checksum field is not excluded anyhow else from checksum calculation and should be 0 for correct result.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/384#note_5796 _______________________________________________ wine-gitlab mailing list -- wine-gitlab(a)winehq.org To unsubscribe send an email to wine-gitlab-leave(a)winehq.org
wine-gitlab mailing list -- wine-gitlab(a)winehq.org To unsubscribe send an email to wine-gitlab-leave(a)winehq.org ``` Ah, right.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/384#note_5817