Skip to content

Commit 55f9712

Browse files
committed
Auriga merge conflict bugfix
Artevilli modified by commenting out Com_DPrintfs
1 parent 6dfbf18 commit 55f9712

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

src/server/sv_client.cpp

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -136,34 +136,21 @@ void SV_GetChallenge(netadr_t from)
136136
mpz_t n;
137137

138138
if (sv_protect->integer & SVP_IOQ3)
139-
if ( SVC_RateLimitAddress( from, 10, 1000 ) ) {
140139
{
141-
Com_DPrintf( "SV_GetChallenge: rate limit from %s exceeded, dropping request\n",
142-
// Prevent using getchallenge as an amplifier
143-
NET_AdrToString( from ) );
144-
if (SVC_RateLimitAddress(from, 10, 1000))
145-
return;
146-
{
147-
}
148-
SV_WriteAttackLog(va("SV_GetChallenge: rate limit from %s exceeded, dropping request\n",
149-
NET_AdrToString(from)));
140+
if ( SVC_RateLimitAddress( from, 10, 1000 ) ) {
141+
// Prevent using getchallenge as an amplifier
142+
// Com_DPrintf( "SV_GetChallenge: rate limit from %s exceeded, dropping request\n", NET_AdrToString( from ) );
143+
SV_WriteAttackLog(va("SV_GetChallenge: rate limit from %s exceeded, dropping request\n", NET_AdrToString(from)));
150144
return;
151145
}
152-
146+
}
153147

154148
// Allow getchallenge to be DoSed relatively easily, but prevent
155-
// Allow getchallenge to be DoSed relatively easily, but prevent
156149
// excess outbound bandwidth usage when being flooded inbound
157-
// excess outbound bandwidth usage when being flooded inbound
158150
if ( SVC_RateLimit( &outboundLeakyBucket, 10, 100 ) ) {
159-
if (SVC_RateLimit(&outboundLeakyBucket, 10, 100))
160-
Com_DPrintf( "SV_GetChallenge: rate limit exceeded, dropping request\n" );
161-
{
151+
// Com_DPrintf( "SV_GetChallenge: rate limit exceeded, dropping request\n" );
152+
SV_WriteAttackLog("SV_GetChallenge: rate limit exceeded, dropping request\n");
162153
return;
163-
SV_WriteAttackLog("SV_GetChallenge: rate limit exceeded, dropping request\n");
164-
return;
165-
}
166-
}
167154
}
168155

169156
oldest = 0;

0 commit comments

Comments
 (0)