diff options
| author | Jonas Karlman <[email protected]> | 2026-01-17 00:24:37 +0000 |
|---|---|---|
| committer | Jerome Forissier <[email protected]> | 2026-02-04 09:04:36 +0100 |
| commit | 35ee795d63977781960da9003a33ee78edb00da4 (patch) | |
| tree | 8aa062638725b38f76ddd80979c3ec7d2ee2df06 /net | |
| parent | d93b3a38d5f847ec7420c86c98286c5d5d55c788 (diff) | |
net: lwip: dns: Fix print of resolved IP address
The lwIP dns command only prints out cached resolved IP addresses.
When a hostname is first resolved and ERR_INPROGRESS is returned the
dns command prints out 0.0.0.0 instead of the resolved IP address.
Fix this by printing out host_ipaddr instead of the temporary ipaddr
that only is valid when ERR_OK is returned.
Fixes: 1361d9f4f00a ("lwip: dns: do not print IP address when a variable is specified")
Signed-off-by: Jonas Karlman <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Diffstat (limited to 'net')
| -rw-r--r-- | net/lwip/dns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/lwip/dns.c b/net/lwip/dns.c index 9964003195f..2b2a5947a2b 100644 --- a/net/lwip/dns.c +++ b/net/lwip/dns.c @@ -86,7 +86,7 @@ static int dns_loop(struct udevice *udev, const char *name, const char *var) if (dns_cb_arg.done && dns_cb_arg.host_ipaddr.addr != 0) { if (!var) - printf("%s\n", ipaddr_ntoa(&ipaddr)); + printf("%s\n", ipaddr_ntoa(&dns_cb_arg.host_ipaddr)); return CMD_RET_SUCCESS; } |
