Browse Source

engine: server: prevent DoS through master server query

pull/2/head
Alibek Omarov 2 years ago
parent
commit
0d2552c3f6
  1. 6
      engine/server/sv_main.c

6
engine/server/sv_main.c

@ -772,6 +772,12 @@ void SV_AddToMaster( netadr_t from, sizebuf_t *msg ) @@ -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…
Cancel
Save