mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: server: prevent DoS through master server query
This commit is contained in:
parent
b3c9637422
commit
0d2552c3f6
@ -772,6 +772,12 @@ void SV_AddToMaster( netadr_t from, sizebuf_t *msg )
|
||||
int clients = 0, bots = 0;
|
||||
int len = sizeof( s );
|
||||
|
||||
if( !NET_IsMasterAdr( from ))
|
||||
{
|
||||
Con_Printf( S_WARN "unexpected master server info query packet from %s\n", NET_AdrToString( from ));
|
||||
return;
|
||||
}
|
||||
|
||||
clients = SV_GetConnectedClientsCount( &bots );
|
||||
challenge = MSG_ReadUBitLong( msg, sizeof( uint ) << 3 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user