Re: [PATCH v2] dhcp: handle multiple offers from the same server

Denis Kenzior <denkenz at gmail.com>
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
Hi James,

On 1/31/22 16:03, James Prestwood wrote:
> It was found that some DHCP servers send multiple offers on occation. Whether
> this is a bug or not its been seen in products and ELL should handle this
> gracefully.
> 
> The issue comes down to these DHCP servers expecting a request associated with
> the last offer they send. The existing behavior in ELL is to ignore all offers
> after the initial, and continue resending requests for the original offer. When
> this happens the DHCP server never responds with an ACK.
> 
> The spec briefly outlines multiple DHCP offers but in the context of multiple
> DHCP servers rather than multiple offers from the same DHCP server. In any
> case its left up to the DHCP client to choose whatever offer it wants, so this
> is what ELL will do.
> 
> Now only the last offer will be used while in the REQUESTING state. If another
> offer comes in before the ACK, that offer will be used and a new request will
> be sent out. Note this is only the case when the offers contain the same
> server ID as the first offer sent (this eliminates the multi DHCP server case
> and will maintain existing behavior, where the first offer is selected always).
> ---
>   ell/dhcp.c | 62 ++++++++++++++++++++++++++++++++++++++++++------------
>   1 file changed, 49 insertions(+), 13 deletions(-)
> 
> v2:
>   - Added a debug print in the multiple offer case
> 

I modified the commit description a bit and applied, thanks.

Regards,
-Denis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.