https://bugs.winehq.org/show_bug.cgi?id=42578
Bug ID: 42578 Summary: WSAStringToAddress fails to parse IP v6 addresses with port number Product: Wine Version: 2.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs@winehq.org Reporter: mterrisse@free.fr Distribution: ---
Created attachment 57489 --> https://bugs.winehq.org/attachment.cgi?id=57489 A console win64 application to test WSAStringToAddress
Ubuntu 16.10, PlayOnLinux, Wine 2.0
WSAStringToAddress can parse "fe80::4145:833f:f90d:4ba8" but fails to parse "[fe80::4145:833f:f90d:4ba8]:1234" (in fact all IP v6 addresses with ports, like "[::]:256")
In attachment you can find an executable TestWSAStringToAddress.exe
TestWSAStringToAddress.exe AF_INET 192.168.200.10 Works fine TestWSAStringToAddress.exe AF_INET 192.168.200.10:1234 Works fine TestWSAStringToAddress.exe AF_INET6 fe80::4145:833f:f90d:4ba8 Works fine TestWSAStringToAddress.exe AF_INET6 [fe80::4145:833f:f90d:4ba8]:1234 Fails - 10022 (WSAEINVAL)
To see the output WINEDEBUG=-all wine TestWSAStringToAddress.exe ... and to have just winsock messages WINEDEBUG=-all,+winsock wine TestWSAStringToAddress.exe ...
The same executable works fine on Windows (tested on Windows 7, Windows 8.1 and Windows 10).
Note something surprising: the behaviour is different with winedbg WINEDEBUG=-all,+winsock winedbg TestWSAStringToAddress.exe AF_INET6 [fe80::4145:833f:f90d:4ba8]:1234 wait WSAStringToAddress succeeds, WSAAddressToString succeeds too, but it returns [::]:1234 I can't understand why the behaviour is different with wine and winedbg
https://bugs.winehq.org/show_bug.cgi?id=42578
Michel Terrisse mterrisse@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mterrisse@free.fr
https://bugs.winehq.org/show_bug.cgi?id=42578
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- We have a test for that that passes so it is interesting it does not pass for your test. Do you mind attaching the test source or a 32bit exe?
https://bugs.winehq.org/show_bug.cgi?id=42578
--- Comment #2 from Michel Terrisse mterrisse@free.fr --- Created attachment 57490 --> https://bugs.winehq.org/attachment.cgi?id=57490 A console win32 application to test WSAStringToAddress + source code (Delphi)
TestWSAStringToAddress.dproj is a Delphi project TestWSAStringToAddress.dpr is the source code you can open with any text editor
https://bugs.winehq.org/show_bug.cgi?id=42578
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |00cpxxx@gmail.com Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- Thanks. I found the issue.
https://bugs.winehq.org/show_bug.cgi?id=42578
--- Comment #4 from Michel Terrisse mterrisse@free.fr --- Thank you very much for the time you spent to look at this. Could you please tell me if the way I call the apis has something unusual I could change to make it work with the current version of Wine?
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=42578
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |b60cd6830848431e359196bb1d8 | |01e93d0952fdf Resolution|--- |FIXED
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- It was a bug in Wine, not your code. It is now fixed in Wine 2.3.
http://source.winehq.org/git/wine.git/?a=commit;h=b60cd6830848431e359196bb1d...
To make it work in 2.0 you have to parse the port on your own and submit the address without the [ ] to the function.
https://bugs.winehq.org/show_bug.cgi?id=42578
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.4.
https://bugs.winehq.org/show_bug.cgi?id=42578
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x
https://bugs.winehq.org/show_bug.cgi?id=42578
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |---
--- Comment #7 from Michael Stefaniuc mstefani@winehq.org --- Removing the 2.0.x milestone from bugs included in 2.0.2.