]> git.ipfire.org Git - thirdparty/u-boot.git/commit
net: bootp: BOOTP/DHCPv4 retransmission improvements
authorSean Edmond <seanedmond@microsoft.com>
Thu, 9 May 2024 02:39:02 +0000 (19:39 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 23 May 2025 17:28:51 +0000 (11:28 -0600)
commite6bca3305bbc333cc71e5bf1ee483bbacfa84736
treeabebeb319c700804caba44029b38a9ed3860464d
parentc867045eef153b0beab69fbc74059fcfc4ad9472
net: bootp: BOOTP/DHCPv4 retransmission improvements

This patch introduces 3 improvements to align with RFC 951:
- retransmission backoff interval maximum is configurable
- initial retranmission backoff interval is configurable
- transaction ID is kept the same for each BOOTP/DHCPv4 request

In applications where thousands of nodes are serviced by a single DHCP
server, maximizing the retransmission backoff interval at 2 seconds (the
current u-boot default) exerts high pressure on the DHCP server and
network layer.

RFC 951 “7.2. Client Retransmission Strategy” states that the
retransmission backoff interval should be limited to 60 seconds.  This
patch allows the interval to be configurable using the environment
variable "bootpretransmitperiodmax"

The initial retranmission backoff period defaults to 250ms, which is
also too small for these scenarios with many clients.  This patch makes
the initial retransmission interval to be configurable using the
environment variable "bootpretransmitperiodinit".

Also, on a retransmission it is not expected for the transaction ID to
change (only the 'secs' field should be updated). Let's save the
transaction ID and use the same transaction ID for each BOOTP/DHCPv4
exchange.

Signed-off-by: Sean Edmond <seanedmond@microsoft.com>
lib/Kconfig
net/bootp.c