Now the IPv4 ll address is set correctly if the ll state machine
is run more than once. The real culprit was that the ipv4ll_running
flag was not cleared when dhcp_release() was called.

Reported-by: Tim Sander <[email protected]>
---
 src/dhcp.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/dhcp.c b/src/dhcp.c
index ac12ff4..7886383 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -565,24 +565,18 @@ static int dhcp_release(struct connman_dhcp *dhcp)
        if (dhcp->timeout > 0)
                g_source_remove(dhcp->timeout);
 
-       if (dhcp->ipv4ll_client) {
-               g_dhcp_client_stop(dhcp->ipv4ll_client);
-               g_dhcp_client_unref(dhcp->ipv4ll_client);
-       }
-
        if (dhcp->dhcp_client) {
                g_dhcp_client_stop(dhcp->dhcp_client);
                g_dhcp_client_unref(dhcp->dhcp_client);
        }
 
-       dhcp->ipv4ll_client = NULL;
        dhcp->dhcp_client = NULL;
 
-       g_free(dhcp->ipv4ll_debug_prefix);
        g_free(dhcp->dhcp_debug_prefix);
-       dhcp->ipv4ll_debug_prefix = NULL;
        dhcp->dhcp_debug_prefix = NULL;
 
+       ipv4ll_stop_client(dhcp);
+
        return 0;
 }
 
-- 
1.8.3.1

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

Reply via email to