While unplugging ethernet cable,
__connman_service_remove_from_network() is called since
related network is getting cleaned up. Therefore ethernet
service goes from online/ready to disconnected, and end
to idle state. However, at that state auto_connect() is
called (even if this service is "planned" to disappear
due to network getting cleaned up) adn we end up with
ethernet network not disappearing, nor its related
service. We only need to set the service as "ignored", so
auto_connect will ignore that particular service.
if (service == NULL)
return;
+ service->ignore = TRUE;
+
__connman_connection_gateway_remove(service,
CONNMAN_IPCONFIG_TYPE_ALL);