[PATCH 4/4] ntdll: Fixup ICMP packet id if SOCK_DGRAM fallback is used.

Jinoh Kang jinoh.kang.kr at gmail.com
Sat Jul 9 03:56:34 CDT 2022


On 7/9/22 07:24, Zebediah Figura wrote:
> On 7/5/22 14:53, Paul Gofman wrote:
>> From: Paul Gofman <pgofman at codeweavers.com>
>>
>> Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
>> ---
>>   dlls/ntdll/unix/socket.c | 95 ++++++++++++++++++++++++++++++++++++++++
>>   dlls/ws2_32/tests/sock.c |  2 +-
>>   server/protocol.def      | 23 +++++++++-
>>   server/sock.c            | 70 +++++++++++++++++++++++++++++
>>   4 files changed, 187 insertions(+), 3 deletions(-)
>>
> 
> This is awfully complicated. Would it be possible to just get the kernel to give us the right ID back, perhaps by adding a new socket option?
> 
> For that matter, I guess the same goes for the first part of the series—if we could get a way to get a SOCK_RAW + IPPROTO_ICMP socket, presumably one where the kernel filters out anything unsafe, that'd be a lot nicer than fixing things up in Wine...
> 

Alternatively, we can use this as an excuse to implement (at least part of) Jacek's proposal, provided that the bugfix isn't urgent:

> Did you consider moving whole sock_send() and try_send() to server? We could then have a proper and reliable queue in server socket object and client could just do a regular generic server ioctl. (I didn't really follow closely the conversation, so sorry if I missed something).

Since ICMP packets tend not to be too large, this would help simplify the fixup process.

-- 
Sincerely,
Jinoh Kang



More information about the wine-devel mailing list