On Sat Jan 21 00:42:27 2023 +0000, Paul Gofman wrote:
Do I understand correctly that the permissions dialog popup is caused solely by SO_REUSEADDR? If that is the case, did you try to just remove setting this option without doing anything else, does anything break? I am not fully sure now without more testing, but it is possible this SO_REUSEADDR was only needed to avoid test failures on Wine when closing the socket do not immediately make the port available for listen (unlike Windows). SO_REUSEADDR has completely different semantics between winsock and BSD sockets. Since not so long ago the compatibility on this part has been improved in Wine, we now always set native SO_REUSEADDR on TCP sockets. And test expectedly doesn't break for me in Wine if I just remove SO_REUSEADDR. I didn't test it on Windows (only run on testbot) but I'd hope it will be fine there as well.
No, the actual culprit turned out to be binding to `INADDR_ANY` after more testing. It is not clear that `SO_REUSEADDR` is triggering the firewall. This MR does not prevent the firewall alert dialog. I'm submitting a separate PR for that.
(I actually realized this much earlier, but I have only so much time...)