Description

When connecting a client using encryption, the server's NetConnection sends the encryption ack and then immediately enables encryption (UNetConnection::EnableEncryptionServer). In the case where the encryption ack is dropped and needs to be resent, this seems to result in the resent encryption ack being encrypted, as the client, which only enables encryption after receiving and processing this ack, never receives/processes it. The logs from the client show it ignoring all messages from the server with the following message:
"PacketHandlerLog: FAESGCMHandlerComponent::Incoming: received encrypted packet before key was set, ignoring."

Steps to Reproduce

Enable encryption for a project (such as in ShooterGame with ShooterGame.TestEncryption or in Lyra with Lyra.TestEncryption), and set an encryption packet handler.
During connection process, if the initial NMT_EncryptionAck control channel message sent from the server is dropped, the client will be unable to connect.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-184683 in the post.

2
Login to Vote

Unresolved
ComponentUE - Networking
Affects Versions5.2
Target Fix5.5
CreatedApr 28, 2023
UpdatedFeb 23, 2024