From bf0b78b74f85b2f303fda44d62e2df1e59036079 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 28 Jul 2025 12:46:39 -0500 Subject: [PATCH 1/3] fix This resolves the issue where a ConnectionRequestMessage could not exceed the transport MTU size because it was using the ReliableSequenced and not the ReliableFragmentedSequenced pipeline. --- .../Runtime/Connection/NetworkConnectionManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs b/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs index 13747b78f6..795eb96098 100644 --- a/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs @@ -626,7 +626,7 @@ private void SendConnectionRequest() } } - SendMessage(ref message, NetworkDelivery.ReliableSequenced, NetworkManager.ServerClientId); + SendMessage(ref message, NetworkDelivery.ReliableFragmentedSequenced, NetworkManager.ServerClientId); message.MessageVersions.Dispose(); } From f1aeb58991fa7083c57ca1dc1695451ecccf95d1 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 28 Jul 2025 12:47:08 -0500 Subject: [PATCH 2/3] test Adjusting the ConnectionApproval tests to use a NetworkConfig.ConnectionData array that is larger than the typical ~1300 byte MTU size (not taking headers into consideration). --- .../Tests/Runtime/ConnectionApproval.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/ConnectionApproval.cs b/com.unity.netcode.gameobjects/Tests/Runtime/ConnectionApproval.cs index ad6075d4ec..df764f9f90 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/ConnectionApproval.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/ConnectionApproval.cs @@ -34,7 +34,7 @@ public ConnectionApprovalTests(PlayerCreation playerCreation) protected override int NumberOfClients => 1; - private Guid m_ValidationToken; + private string m_ValidationToken; protected override bool ShouldCheckForSpawnedPlayers() { @@ -46,8 +46,13 @@ protected override void OnServerAndClientsCreated() m_ClientDisconnectReasonValidated = false; m_BypassConnectionTimeout = m_PlayerCreation == PlayerCreation.FailValidation; m_Validated.Clear(); - m_ValidationToken = Guid.NewGuid(); - var validationToken = Encoding.UTF8.GetBytes(m_ValidationToken.ToString()); + m_ValidationToken = string.Empty; + + while (m_ValidationToken.Length < 2000) + { + m_ValidationToken += Guid.NewGuid().ToString(); + } + var validationToken = Encoding.UTF8.GetBytes(m_ValidationToken); m_ServerNetworkManager.ConnectionApprovalCallback = NetworkManagerObject_ConnectionApprovalCallback; m_ServerNetworkManager.NetworkConfig.PlayerPrefab = m_PlayerCreation == PlayerCreation.Prefab ? m_PlayerPrefab : null; if (m_PlayerCreation == PlayerCreation.PrefabHash) From 724f6094bf0b18efc3bcedbcd70c2298052ae485 Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 28 Jul 2025 12:56:07 -0500 Subject: [PATCH 3/3] update adding change log entry. --- com.unity.netcode.gameobjects/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 4a2bfd65d5..c40487c722 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -10,6 +10,16 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Added +### Fixed + +- Fixed issue where NetworkConfig.ConnectionData could cause the ConnectionRequestMessage to exceed the transport's MTU size and would result in a buffer overflow error. (#3565) + +### Changed + +## [1.14.0] - 2025-07-21 + +### Added + - Added serializer for `Pose` (#3540) - Added mappings between `ClientId` and `TransportId`. (#3515) - Added `SinglePlayerTransport` that provides the ability to start as a host for a single player network session. (#3475)