DA: Change connection error type AUTH_FAILED to INVALID_KEY in case of SAE 27/283627/1
authorJaehyun Kim <jeik01.kim@samsung.com>
Mon, 31 Oct 2022 12:19:41 +0000 (21:19 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Mon, 31 Oct 2022 12:19:41 +0000 (21:19 +0900)
Change connman_service_error type from CONNMAN_SERVICE_ERROR_AUTH_FAILED
to CONNMAN_SERVICE_ERROR_INVALID_KEY in case of SAE security type.

Change-Id: Ia276f8da2d83e845b7431a1b89d27fe939d01536
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
src/service.c

index 356a218..6a6da36 100755 (executable)
@@ -9514,6 +9514,20 @@ int __connman_service_indicate_error(struct connman_service *service,
        if (service->state == CONNMAN_SERVICE_STATE_FAILURE)
                return -EALREADY;
 
+#if defined TIZEN_EXT
+       /*
+        * change connman_service_error type
+        * from CONNMAN_SERVICE_ERROR_AUTH_FAILED to CONNMAN_SERVICE_ERROR_INVALID_KEY
+        * in case of SAE security type.
+        */
+       if (error == CONNMAN_SERVICE_ERROR_AUTH_FAILED &&
+               service->security == CONNMAN_SERVICE_SECURITY_SAE) {
+               DBG("SAE security auth failed, set error to invalid-key and ignore the service");
+               error = CONNMAN_SERVICE_ERROR_INVALID_KEY;
+               __connman_service_set_ignore(service, true);
+       }
+#endif
+
        set_error(service, error);
 
 /* default internet service: fix not cleared if pdp activation*/