Skip to content

nn_ac: Add local IP getter implementation for Linux#1839

Open
ashquarky wants to merge 1 commit intocemu-project:mainfrom
ashquarky:patch/linux-ifaddrs
Open

nn_ac: Add local IP getter implementation for Linux#1839
ashquarky wants to merge 1 commit intocemu-project:mainfrom
ashquarky:patch/linux-ifaddrs

Conversation

@ashquarky
Copy link
Copy Markdown

Adds implementation of _GetLocalIPAndSubnetMask for Linux. This allows LAN play in NEX games to work correctly. Previously, the fallback address was always used, which caused connection instability.

@goeiecool9999
Copy link
Copy Markdown
Collaborator

This is good.
I have one note. What if there are multiple IP addresses associated with the host? For example if the user is running virtual machines with libvirt it creates a bridge interface with a valid IP address. And when a VPN is running it also creates a virtual interface with an IP address associated with it. Often these interfaces will have a RFC 1918 address so we can't filter by that either.
It's possible that these virtual interfaces will appear later in the linked list because they're usually created later than the interfaces for the physical hardware, but I don't think the API explicitly guarantees that order and if so we probably shouldn't rely on it(?)
At least virtual VPN connections can be filtered by checking if the interface has the IFF_POINTOPOINT flag set though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants