We need to specify a requested IP address when our DHCP client state
is REBINDING as well as REQUESTING and REBOOTING; or else we end up
sending a DHCP request for 0.0.0.0, which generally just gets ignored.
---
gdhcp/client.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gdhcp/client.c b/gdhcp/client.c
index 47ce2e8..86c0c58 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -470,11 +470,13 @@ static int send_request(GDHCPClient *dhcp_client)
packet.xid = dhcp_client->xid;
packet.secs = dhcp_attempt_secs(dhcp_client);
- if (dhcp_client->state == REQUESTING || dhcp_client->state == REBOOTING)
+ if (dhcp_client->state == REQUESTING ||
+ dhcp_client->state == REBOOTING ||
+ dhcp_client->state == REBINDING)
dhcp_add_option_uint32(&packet, DHCP_REQUESTED_IP,
dhcp_client->requested_ip);
- if (dhcp_client->state == REQUESTING)
+ if (dhcp_client->state == REQUESTING || dhcp_client->state == REBINDING)
dhcp_add_option_uint32(&packet, DHCP_SERVER_ID,
dhcp_client->server_ip);
--
1.9.1
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman