Hi Forest,

On 15.07.2012 16:03, Forest Bond wrote:
diff --git a/gdhcp/client.c b/gdhcp/client.c
index ec1b2a2..7280e1d 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);

Well, I decided to go ahead and test this fix and it does appear to do the right
thing:

[...]

So I guess the only remaining question is where it should be fixed.  Like I said
above, I think we should unconditionally set state to INIT_SELECTING if we're
going to be sending DHCP DISCOVER requests.  If this makes sense to everyone
I'll go ahead and submit a patch.

Thoughts?

I had a look into the RFC 2131. According to the spec we should enter the INIT state if something goes wrong in the REBINDING state. And we get an DHCPNAK.

Looks like your patch is correct. I am still a bit worried about the other cases, e.g. restart_dhcp() is called from different places in that file. Is this correct for all cases?

In any case please submit your patch.

Thanks for digging into this.

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

Reply via email to