Skip to content

Fix and complete IPv6 support#4

Open
illwieckz wants to merge 7 commits intomasterfrom
illwieckz/ipv6
Open

Fix and complete IPv6 support#4
illwieckz wants to merge 7 commits intomasterfrom
illwieckz/ipv6

Conversation

@illwieckz
Copy link
Member

Before:

20260131-174255-000 unvanquished-xonpress-ipv6

After:

20260131-174306-000 unvanquished-xonpress-ipv6

The server metadata not being parsed may be another problem.

@illwieckz
Copy link
Member Author

illwieckz commented Jan 31, 2026

The port should also be parsed outside the loop:

20260131-185120-000 unvanquished-xonpress-ipv6

Everything looks to now be fixed:

  • The port was parsed inside the loop, it should not.
  • The address was passed to the socket_sendto() with [] and it should not.
  • The socket was IPv4, there is no one IPv4 socket and one IPv6 socket.

I fixed the port parsing, implemented the [] trimming, made it dual-socket ipv4/ipv6, and fixed minor things too. Because having the same server being listed twice with the same name can be confusing, I added a [IPv6] suffix to the name. We may want to do the same in game.

Here is how it now looks:

20260131-191701-000 unvanquished-xonpress-ipv6

@slipher
Copy link
Member

slipher commented Jan 31, 2026

I guess we didn't notice the bug before now due to Unvanquished/unvanquished-infrastructure#45.

@illwieckz illwieckz changed the title engine: only add the completely parsed ipv6 server address Fix and complete IPv6 support Feb 1, 2026
@slipher
Copy link
Member

slipher commented Feb 3, 2026

Because having the same server being listed twice with the same name can be confusing, I added a [IPv6] suffix to the name.

Having two rows in the list for each IPv6-supporting server is so ugly that I feel we'd be better off just doing only IPv4 here. If we want to have IPv6, it should be done like it used to be, with two connect buttons in a single row rather than multiple rows.

Regarding the in-game browser, the Daemon client processes something called "server links" from the master server that is supposed to let you tell which IPv4 and IPv6 addresses refer to the same server. So it ostensibly recognizes that one server has two addresses.

@illwieckz
Copy link
Member Author

illwieckz commented Feb 4, 2026

Because having the same server being listed twice with the same name can be confusing, I added a [IPv6] suffix to the name.

Having two rows in the list for each IPv6-supporting server is so ugly that I feel we'd be better off just doing only IPv4 here. If we want to have IPv6, it should be done like it used to be, with two connect buttons in a single row rather than multiple rows.

Regarding the in-game browser, the Daemon client processes something called "server links" from the master server that is supposed to let you tell which IPv4 and IPv6 addresses refer to the same server. So it ostensibly recognizes that one server has two addresses.

That would be very good to implement, but for now this fixes the bug. Also the fixes are needed for a “Connect with IPv6” button anyway. We can merge this and improve over it later. This code is already used on production anyway (to not let our website look bad).

@slipher
Copy link
Member

slipher commented Feb 5, 2026

Well we could merge the code and just comment out the line that adds an IPv6 row, so we don't have the ugliness of two rows per server.

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