Re: [PATCH v2] dhcp: fix overflow causing retries to stop
Denis Kenzior <[email protected]> Fri, 12 Jan 2024 11:11:33 -0600
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <[email protected]> |
Hi James, On 1/11/24 07:33, 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 without > any event notification. > > Roughly 2 minutes has passed when we reach >5 attempts so it makes > little sense to retry indefinitely, at least without notifying the > upper layers (which could decided to retry themselves). Okay, but '5' is just a magic number in the code with no context. Lets avoid that. Can we make this limit configurable? Say between 3..30? For iwd, even 2 minutes might be too long. Regards, -Denis