Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network/Socket: Enable broadcast permissions in socket requests #11568

Merged
merged 3 commits into from Mar 7, 2023
Merged

Network/Socket: Enable broadcast permissions in socket requests #11568

merged 3 commits into from Mar 7, 2023

Conversation

SMarioMan
Copy link
Contributor

@SMarioMan SMarioMan commented Feb 15, 2023

This fixes a longstanding issue where Dolphin could not host or connect to LAN rooms when using the Mario Kart Wii LAN Multiplayer mod, available both standalone and in some custom track distributions. I have been unable to identify unmodified commercial games that benefit from this change.
I understand that Dolphin supports setting socket options when requested, but it seems that a real Wii console supports sending broadcast packets even without the permission being explicitly set. To be more specific, I do not see these permissions being requested by the mod, but I admit that I am no Wii networking expert.
I do not do error logging here, as it is a best-effort approach, and sockets not meant to broadcast seemingly fail to apply this option.

@sepalani
Copy link
Contributor

I think I can write a hardware test to confirm (or not) that behaviour. I also have Mario Kart Wii so I can check the mod.

@SMarioMan
Copy link
Contributor Author

I think I can write a hardware test to confirm (or not) that behaviour. I also have Mario Kart Wii so I can check the mod.

That would be excellent on your part. Thank you.

Source/Core/Core/IOS/Network/Socket.cpp Outdated Show resolved Hide resolved
Co-authored-by: sepalani <sepalani@hotmail.fr>
Copy link
Contributor

@sepalani sepalani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested on Windows.

Side note regarding testing this build. It's based on a branch where some games can't boot (due to a JIT regression I suppose) so I had to switch to "Cached interpreter" for some of the games I tested. Otherwise, it doesn't seem to produce a network regression on my end.

@SMarioMan
Copy link
Contributor Author

Thank you for your work on this, @sepalani. Is there anything that remains to be done before this can be merged?

@AdmiralCurtiss AdmiralCurtiss merged commit 0b9002e into dolphin-emu:master Mar 7, 2023
@SMarioMan SMarioMan deleted the socket-broadcast branch March 8, 2023 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants