NetHandler - Use the right type to hold additional_accepts config value.#11659
NetHandler - Use the right type to hold additional_accepts config value.#11659brbzull0 merged 1 commit intoapache:masterfrom
additional_accepts config value.#11659Conversation
Changed from unsigned to signed as this is what's expected. This PR also makes sure the records validity check passes.
|
Thanks for finding this, would the behavior be the same in this case? It is definitely a bug that additional_accepts isn't a signed int, but doesn't setting an unsigned int to -1, make it equal to 2^32 - 1 (INT32_MAX - 1)? In that case, there's a section of code in NetHandler.cc that adds 1 to that, making it overflow to 0, and then sets it to 2^32 - 1 anyway. this is that code: It's certainly a bug, but if the behavior is the same, maybe this doesn't need to go into 10.0.x? |
No bother, thanks for looking at it. Yes, same behavior.
Well, it partialy depends on where #11667 lands, if #11667 lands in 10 then this should also land in 10, at least part of this, to avoid: Thanks. |
|
Cherry-picked to v10.0.x |
proxy.config.net.additional_accepts is expected to use
-1but the code wasn't storing the value into a signed type, so changed fromunsignedtosignedas this is what's expected.This PR also makes sure the records validity check passes.
Original PR -> #10098
Part of a fix for #11649