]> git.ipfire.org Git - thirdparty/u-boot.git/commit
net: lwip: dhcp: Save DHCP siaddr field to tftpserverip env var
authorJonas Karlman <jonas@kwiboo.se>
Sat, 17 Jan 2026 00:24:41 +0000 (00:24 +0000)
committerJerome Forissier <jerome.forissier@arm.com>
Wed, 4 Feb 2026 08:04:36 +0000 (09:04 +0100)
commitbd1f40a4028998405cf4d29ad8ba407c6771b76a
tree4bab59ee232589ddbb762d405e04689301afda97
parent8d89b16ea4bae5b0df1080f0c3b8ea4a751f40ea
net: lwip: dhcp: Save DHCP siaddr field to tftpserverip env var

The DHCP siaddr field contains the IP address of next server to use in
bootstrap. Typically this will be the IP address of a TFTP server or the
IP address of the DHCP server itself.

RFC 2131, 2. Protocol Summary, Page 10:

   DHCP clarifies the interpretation of the 'siaddr' field as the
   address of the server to use in the next step of the client's
   bootstrap process.  A DHCP server may return its own address in the
   'siaddr' field, if the server is prepared to supply the next
   bootstrap service (e.g., delivery of an operating system executable
   image).  A DHCP server always returns its own address in the 'server
   identifier' option.

Set the 'tftpserverip' env variable when the siaddr field contains an
IP address that is different compared to the DHCP server IP address.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
net/lwip/dhcp.c