Hi Forest,

On 07/16/2012 04:09 PM, Forest Bond wrote:
From: Forest Bond <[email protected]>

With the previous behavior, we would end up sending a discover message
and then ignoring the reply due to the client state mismatch, so a
restart would never result in successful acquisition of a lease.

RFC 2131 specifies that the client should return to INIT state in
various restart scenarios.  However, also note that it would not make
sense in any case to send a discover message and ignore the reply.
---
  gdhcp/client.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gdhcp/client.c b/gdhcp/client.c
index 7e8e494..cf04ced 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -1361,6 +1361,7 @@ static void restart_dhcp(GDHCPClient *dhcp_client, int 
retry_times)

        dhcp_client->retry_times = retry_times;
        dhcp_client->requested_ip = 0;
+       dhcp_client->state = INIT_SELECTING;
        switch_listening_mode(dhcp_client, L2);

        g_dhcp_client_start(dhcp_client, dhcp_client->last_address);


Looks good, ACK from me.


Cheers,
Jukka


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to