diff options
author | Ryan Smith <ryan.smith@density.io> | 2022-04-11 09:20:39 -0600 |
---|---|---|
committer | Daniel Wagner <wagi@monom.org> | 2022-04-14 20:48:05 +0200 |
commit | 0a373d275831ce65697c6ed17067654857735dae (patch) | |
tree | e9eeaba057bd9d45f19de83a91ade1a0929f23f1 | |
parent | c37bc27b5891ce1629f3a3c6afa4cb8e3adab5d3 (diff) | |
download | connman-0a373d275831ce65697c6ed17067654857735dae.tar.gz |
gdhcp: fix server address byte order
The get_ip function calls inet_ntoa, which expects the IP address
in network byte order.
-rw-r--r-- | gdhcp/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c index 3016dfc2..7efa7e45 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -3036,7 +3036,7 @@ char *g_dhcp_client_get_server_address(GDHCPClient *dhcp_client) if (!dhcp_client) return NULL; - return get_ip(dhcp_client->server_ip); + return get_ip(htonl(dhcp_client->server_ip)); } char *g_dhcp_client_get_address(GDHCPClient *dhcp_client) |