Pass user verification on the first connection attempt to public servers

Post your bugs and problems so we can fix them.
Post Reply
Hornwitser
Fast Inserter
Fast Inserter
Posts: 121
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

Pass user verification on the first connection attempt to public servers

Post by Hornwitser »

TL;DR
Pass user verification on the first connection attempt to public servers.

What ?
When connecting to a server in the public servers list the client first tries to connect without the credentials that prove it's a verified user. But public servers have to have user verification enabled to be listed, so this connection attempt always fails with the user verification missing status. Since we expect all the servers in the public list to require user verification it makes sense to always send the credentials when connecting to servers in the public server list.

Why ?
A friend of mine tried to connect to my game behind a NAT and it failed. I did a packet capture and it showed the NAT punching worked and two way communication was established, but the connection attempt failed because it didn't contain the user credentials. Now normally the client immediately does another connection attempt with credentials, but that attempt didn't reach through the NAT for some reason. I'm not sure why this was the case, multiple attempts at connecting all did this same thing, but I'm theorizing that if the first connection attempt had had the credentials in it it would have worked.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12030
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Pass user verification on the first connection attempt to public servers

Post by ssilk »

This points in my eyes to a networking problem. It should not be workarounded (sending credentials without real need, security!), instead that problem should be fixed.

Please ask in the technical gameplay board for help to find the reason for this and eventually create a bug ticket.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Hornwitser
Fast Inserter
Fast Inserter
Posts: 121
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

Re: Pass user verification on the first connection attempt to public servers

Post by Hornwitser »

ssilk wrote:
Tue Apr 27, 2021 6:23 am
It should not be workarounded (sending credentials without real need, security!), instead that problem should be fixed.
User verification is a requirement for a server to be listed on the public server list. Connecting to public servers with user verification enabled requires the client sending the user verification credentials to the server. It is not a workaround to send these credentials on the first attempt, it removes 2 unnecessary round trips during the connecting process since we know connecting without the credentials (which the client tries to do first) will always fail.

User avatar
ptx0
Filter Inserter
Filter Inserter
Posts: 992
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Pass user verification on the first connection attempt to public servers

Post by ptx0 »

ssilk wrote:
Tue Apr 27, 2021 6:23 am
(sending credentials without real need, security!)
:roll: it's a token, not a username/password.
My Mods - Fish Per Minute base size metric
• • •
Base: Bob's @ 1 Million SPM
• • •
Linear search and overflows are indicative of sloppy coding practices.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12030
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Pass user verification on the first connection attempt to public servers

Post by ssilk »

Ok, I have no clue about multiplayer :)

If that is really like so, it sounds to me like a bug, even if Factorio behaves as intended, but useless network traffic is a bug.

Moved to bug reports. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
NotRexButCaesar
Filter Inserter
Filter Inserter
Posts: 931
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: Pass user verification on the first connection attempt to public servers

Post by NotRexButCaesar »

ssilk wrote:
Thu Apr 29, 2021 3:02 am
it sounds to me like a bug, even if Factorio behaves as intended, but useless network traffic is a bug.
Is the definition of a bug not "an unintended behavior?" If the useless traffic reduces complexity, maybe the devs do not want to change it.
Sarcasm and insults are generally neither helpful nor appreciated.
You never know what type of day someone else is having.

User avatar
ptx0
Filter Inserter
Filter Inserter
Posts: 992
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: Pass user verification on the first connection attempt to public servers

Post by ptx0 »

the bug is that the NAT punching doesn't occur on the 2nd connection attempt

there's a implementation defect that it doesn't simply send credentials, requiring unnecessary round-trip.

please, just don't comment on something if you don't understand it, Rex.
My Mods - Fish Per Minute base size metric
• • •
Base: Bob's @ 1 Million SPM
• • •
Linear search and overflows are indicative of sloppy coding practices.

Post Reply

Return to “Bug Reports”