We need to save the server IP when REBOOTING as well as SELECTING.
Without this, DHCP renew will never work, because we don't know where
to send the unicast renew packets.
---
gdhcp/client.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gdhcp/client.c b/gdhcp/client.c
index 2b7202a..47ce2e8 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -2366,6 +2366,12 @@ static gboolean listener_event(GIOChannel *channel,
GIOCondition condition,
g_free(dhcp_client->assigned_ip);
dhcp_client->assigned_ip = get_ip(packet.yiaddr);
+ if (dhcp_client->state == REBOOTING) {
+ option = dhcp_get_option(&packet,
+ DHCP_SERVER_ID);
+ dhcp_client->server_ip = get_be32(option);
+ }
+
/* Address should be set up here */
if (dhcp_client->lease_available_cb)
dhcp_client->lease_available_cb(dhcp_client,
--
1.9.1
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman