2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00

Don't generate different challenge on port change

This commit is contained in:
Asmodai 2021-01-28 01:21:19 +03:00
parent 370dddb8b4
commit 7841446b9d

View File

@ -1813,8 +1813,7 @@ int g_oldest_challenge = 0;
typedef struct challenge_buf_s
{
uint32_t ip;
uint16_t port;
uint32_t salt[14];
uint32_t salt[15];
} challenge_buf_t;
challenge_buf_t g_raw_challenge_buf;
@ -2529,7 +2528,6 @@ int EXT_FUNC SV_GetChallenge(const netadr_t& adr)
#ifdef REHLDS_FIXES
uint8_t digest[16];
g_raw_challenge_buf.ip = *(uint32_t*)adr.ip;
g_raw_challenge_buf.port = adr.port;
MD5Context_t ctx;
MD5Init(&ctx);
MD5Update(&ctx, (uint8_t *)&g_raw_challenge_buf, sizeof(g_raw_challenge_buf));