net: lwip: dhcp: set ntpserverip environment variable
authorJerome Forissier <jerome.forissier@linaro.org>
Mon, 22 Sep 2025 09:35:43 +0000 (11:35 +0200)
committerJerome Forissier <jerome.forissier@linaro.org>
Tue, 30 Sep 2025 10:01:36 +0000 (12:01 +0200)
commit61a6f5ab99197c8b1233de0ac9861bcae3d9df05
treeaba1319233b3931064f79c194da97fef42750adc
parent57a623230eaadc836c548a1e7effae34ec11eb0f
net: lwip: dhcp: set ntpserverip environment variable

Once the DHCP exchange is complete, if we have an IP address for an NTP
server, set the ntpserverip environment variable accordingly. Although
not necessary to make the sntp command use that server (since it is
known internally to the lwIP stack), this makes the behavior in line
with the legacy NET stack. This is also consistent with exporting the
DNS servers etc.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Suggested-by: Michal Simek <michal.simek@amd.com>
net/lwip/dhcp.c