MDNS advertisements may contain incorrect IP address
Describe the bug If your computer has multiple IP addresses, VRChat picks only one of them, and the one it picks may not be appropriate.
In my case, in response to an MDNS request received on interface 17 "Ethernet", it sends a response containing only the IP address of interface 71 "vEthernet (WSL (Hyper-V firewall))". Is it because vEthernet has the highest interface index on my system? The same problem may occur with some VPN software configurations (for example OpenVPN in tap mode), or if the computer running VRChat is otherwise connected to an isolated network.
Sending OSC messages to VRChat does not work because devices connected via Ethernet cannot connect to the IP of the vEthernet adapter.
The MDNS implementation should be able to select an appropriate IP address by matching the interface index of the request to the interface index of the IP address. If the client IP address is available but not the interface index, it should be possible to determine an appropriate response IP address by using GetBestRoute2. If it's a proper MDNS library, it may do the correct thing if no address is provided by VRChat.
As a last resort, if you determine the client IP that would be used (or is being used) for connecting to VRChat's servers on the internet, that IP address should be reachable by MDNS clients for most users.
To Reproduce Steps to reproduce the behavior:
- Install a virtual machine or VPN network adapter, or otherwise connect the computer to a second network that is not reachable from the network where the OSC sender is.
- Launch VRChat.
- Try to connect to VRChat's OSC over the network using the advertised MDNS service.
- The packets do not reach VRChat because the client either cannot route the IP address provided by VRChat or does not have the correct route.
Expected behavior VRChat should return an appropriate IP address.
Info (please complete the following information):
- Type: Desktop
- VRChat version and build: 2024.2.3-1470-37f6872177-Release