mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 06:09:59 -04:00
[master] address overflow in retry backoff
4877. [bug] Address integer overflow when exponentially backing off retry intervals. [RT #47041]
This commit is contained in:
parent
b575c4ec42
commit
8b440753b6
2 changed files with 9 additions and 2 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
4877. [bug] Address integer overflow when exponentially
|
||||
backing off retry intervals. [RT #47041]
|
||||
|
||||
4876. [bug] Address deadlock with accessing a keytable. [RT #47000]
|
||||
|
||||
4875. [bug] Address compile failures on older systems. [RT #47015]
|
||||
|
|
|
|||
|
|
@ -1810,8 +1810,12 @@ fctx_setretryinterval(fetchctx_t *fctx, unsigned int rtt) {
|
|||
/*
|
||||
* Exponential backoff after the first few tries.
|
||||
*/
|
||||
if (fctx->restarts > fctx->res->nonbackofftries)
|
||||
us <<= (fctx->restarts - fctx->res->nonbackofftries);
|
||||
if (fctx->restarts > fctx->res->nonbackofftries) {
|
||||
int shift = fctx->restarts - fctx->res->nonbackofftries;
|
||||
if (shift > 6)
|
||||
shift = 6;
|
||||
us <<= shift;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a fudge factor to the expected rtt based on the current
|
||||
|
|
|
|||
Loading…
Reference in a new issue