dolphin
dolphin copied to clipboard
BBA/BuiltIn: Add SSDP multicast support
This PR implements the SSDP multicast support properly. It fixes one issue I had where my Windows host, its Linux VM and my smartphone couldn't see each other joining/leaving the LAN consistently. This method also seems firewall friendly, I don't see packets being dropped anymore on Wireshark.
The UDP port not opening issue isn't fixed in this PR. If the Windows discovery service is enabled, the VM and its hosts can't see each other consistently (shouldn't matter as I don't expect many people to use Dolphin in a VM to play LANs/online).
Ready to be reviewed & tested.
This PR causes a crash on android for my device (Pixel 3a) but apparently no one else has the problem.
After some testing, here's what's worth mentioning for Windows users:
- When the SSDP discovery service is disabled, it makes the console detection (using the SSDP protocol) more stable.
- Disabling Windows firewall also makes matchmaking/negotiation (UDP) more consistent and less likely to fail (due to the firewall dropping the UDP packet.
For reference, so that it isn't lost: Here is a log from JMC reproducing the crash. No symbols for the native code, unfortunately. https://pastebin.com/BFpmnxby
Needs a rebase
@JMC47 I chose another approach that doesn't rely on the JNI code. It might not be 100% accurate but it's still better than introducing a JNI crash. Can you confirm that this new build doesn't crash on Android anymore?
I somehow missed this comment. My bad. Testing now
@sepalani this works and does not crash on Android.
@iwubcode Done. I wrote a more detailed comment regarding network interface and I improved the error logs to add the reason of failure.
This PR was rebased to use Common::DecodeNetworkError
, I'll test it again later this week to make sure it didn't introduce regressions.
Is this all done now? I'd like to get the BBA stuff squared away before the Progress Report and Beta build.
@JMC47 Yes, I'm done here and with https://github.com/dolphin-emu/dolphin/pull/10985. Tested on MKDD and Kirby Air Ride, the changes are working as intended on my end.