From 816e9b993bceb9a17bc951e7125b423f5cde9298 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 23 Aug 2022 09:33:20 -0700 Subject: [PATCH] Tightened up GetClientAddr() logging --- .efrocachemap | 40 +++++++++---------- CHANGELOG.md | 2 +- src/ballistica/ballistica.cc | 2 +- .../game/connection/connection_set.cc | 6 ++- 4 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 376c5d47..f8f00ed5 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/64/57/bce7a68d30b264db87875ae438d0", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a0/13/d1acf158dfd7a488c3f205e1b295", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e4/2f/13992cbb0828dfd2a89aee9b95ce", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2a/8c/b7eea27a4af451d0702293fcbe5a", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/bd/ea/d9f13cd18a36730bdfb36270f5bb", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6f/3f/3cdbfba6bc0958e75dfa2e3b6504", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2f/a0/856648775a2b52adc76f34710ad7", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5b/17/5939ad716f1dbb1bc102cafff607", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/29/f1/778a93a30aa31b974b4535663a37", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c5/08/f1b0557a07db1514b524be6e291e", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/12/a5/77bd5d22844aed9bce4c75fc4b04", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8b/eb/78c12a631a351d4426feb7a6aa53", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b6/fb/f42a2961818723b3d371ce0d99b3", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/72/59/051f60df54f0300a0db56518fdb1", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/d5/5233133e52ec03d5fd96f835a866", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3a/9e/e169647cce45ed806b7dd85d61f1", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/af/5f/9c48d18bfe713bab14a847e21bfa", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/55/bf/37e1d0376ae2c822193c8bc97f10", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/bf/0b/04c322afed1c65cf03fcb692b8ee", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/17/b3/6b3d6b121fdb676422f762c018bb", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b7/97/058ec9b0958eb0c16d4b73e46c77", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fc/87/a43180a273071e2297727dae55e0", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/84/d648830f95c5adaa26e259267524", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a3/af/3c0f8a3884cd4896172790e49789", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f1/53/567de5c38f219eea734d5d780cfe", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0e/29/2b6acec2f043af8ffa28405518ba", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ec/e1/5b85a04e38545aa015c92819b1cc", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/62/6d/8440e0fccd5482c6cf06f5f8eb74", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/17/41/98b75e3c0dd041875081cb230c08", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/df/6e/8992acdcf955eec1df42f97c6559", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cd/2e/a7985d25068b8c44bf64123131c2", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/be/f1/e13ed7948ffd0da65cbe0528ea94", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1d/b6/58b8b43dc5071445e0a9d666487a", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/fe/fa0c92655a72b7c4eadb3d12ba32", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e1/23/5572f9e4822e6798a0f1a249dd5a", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/42/4f/609cd8f582a6e7f26772816a60c7", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/db/f3/e9270a5d334a7f97f11cc151552a", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ae/67/9c59c7e046c568adc89819afc445", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/60/9a/8e4789f6f0b4f394a00043ab8ec7", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/25/c6/2d9856f3b32b71c3b222786edadb", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6a/91/ddafd190b867e23110b18ddce9ab", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/07/5f/246e5ef83e81f516aa82033470c5", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/18/04/ed17d0ac8813451038b4831dd3c1", diff --git a/CHANGELOG.md b/CHANGELOG.md index 0947fc1d..82d3a7e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20700, api 7, 2022-08-22) +### 1.7.7 (build 20702, api 7, 2022-08-23) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 7106a21f..8d4ab157 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -21,7 +21,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20700; +const int kAppBuildNumber = 20702; const char* kAppVersion = "1.7.7"; // Our standalone globals. diff --git a/src/ballistica/game/connection/connection_set.cc b/src/ballistica/game/connection/connection_set.cc index 97400f0a..c5592d39 100644 --- a/src/ballistica/game/connection/connection_set.cc +++ b/src/ballistica/game/connection/connection_set.cc @@ -451,9 +451,9 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, case BA_PACKET_DISCONNECT_FROM_CLIENT_REQUEST: { if (data_size == 2) { // Client is telling us (host) that it wants to disconnect. + uint8_t client_id = data[1]; if (!VerifyClientAddr(client_id, addr)) { - BA_LOG_ONCE("VerifyClientAddr() failed."); break; } @@ -499,8 +499,8 @@ auto ConnectionSet::UDPConnectionPacket(const std::vector& data_in, case BA_PACKET_CLIENT_GAMEPACKET_COMPRESSED: { if (data_size > 2) { uint8_t client_id = data[1]; + if (!VerifyClientAddr(client_id, addr)) { - BA_LOG_ONCE("VerifyClientAddr() failed."); break; } @@ -707,6 +707,8 @@ auto ConnectionSet::VerifyClientAddr(uint8_t client_id, const SockAddr& addr) if (addr == connection_to_client_udp->addr()) { return true; } + BA_LOG_ONCE("VerifyClientAddr() found mismatch for client " + + std::to_string(client_id) + "."); return false; }