Re: [PATCH] dhcp: fix overflow causing retries to stop
Denis Kenzior <[email protected]> Mon, 8 Jan 2024 22:27:55 -0600
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
Hi James, On 1/8/24 22:06, James Prestwood wrote: > If DHCP is in a SELECTING/REQUESTING state and the number of attempts > reached a value where 2 << attempts overflowed an unsigned int the > next timeout would become zero, causing DHCP to never retry. > > Since 5 attempts results in a value of 64 we can instead just limit > the attempts to 5, and set next_timeout to 64 after that as the spec > requires. Overflowing next_timeout implies that discovery is taking ~25 minutes? I think I'd rather we gave up and sent a NO_LEASE event after retries hits a certain max number? Regards, -Denis