Check if the service IPv4/6 ipconfig is turned OFF, in this
case do not try to connect to that service because it will
not succeed.
Fixes BMC#25587
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
+static connman_bool_t is_ipconfig_usable(struct connman_service *service)
+{
+ if (__connman_ipconfig_is_usable(service->ipconfig_ipv4) == FALSE &&
+ __connman_ipconfig_is_usable(service->ipconfig_ipv6)
+ == FALSE)
+ return FALSE;
+
+ return TRUE;
+}
+
static connman_bool_t is_ignore(struct connman_service *service)
{
if (service->autoconnect == FALSE)
if (service->state == CONNMAN_SERVICE_STATE_FAILURE)
return TRUE;
+ if (is_ipconfig_usable(service) == FALSE)
+ return TRUE;
+
return FALSE;
}
case CONNMAN_SERVICE_TYPE_GADGET:
return -EINVAL;
default:
+ if (is_ipconfig_usable(service) == FALSE)
+ return -ENOLINK;
+
err = service_connect(service);
}