callofduty4x / CoD4x_Server

Extended Call of Duty 4 server
https://cod4x.ovh
GNU Affero General Public License v3.0
335 stars 120 forks source link

Fix workaround for malicious client reliableAcknowledge DOS #407

Closed ineedbots closed 1 year ago

ineedbots commented 1 year ago

The original fix https://github.com/callofduty4x/CoD4x_Server/pull/336 didn't always work, this fixes it.

diamante0018 commented 1 year ago

@IceNinjaman Hello, please take a look at this.

ineedbots commented 1 year ago

People have been exploiting this issue for a long while now, this is critical to get this merged

veteri commented 1 year ago

I know this is already merged but how is this code any different? Didn't you just merge the 2 ifs but the flow is still the exact same?

ineedbots commented 1 year ago

No, before it only checked cl->reliableAcknowledge < 0 when it needs to be checking the difference of cl->reliableSequence and cl->reliableAcknowledge is < 0

veteri commented 1 year ago

Yeah i see it now makes sense, my bad