Otherwise __connman_dhcp_stop() is never called when the disconnect is
triggered by the peer. peer_disconnect() already handles this correctly for
locally triggered disconnects.
---
 src/peer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/peer.c b/src/peer.c
index 206b799b2a18..8a380c96d2a4 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -909,6 +909,8 @@ int connman_peer_set_state(struct connman_peer *peer,
        case CONNMAN_PEER_STATE_DISCONNECT:
                if (peer->connection_master)
                        stop_dhcp_server(peer);
+               else
+                       __connman_dhcp_stop(peer->ipconfig);
                peer->connection_master = false;
                peer->sub_device = NULL;
 
-- 
2.1.4

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to