]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Note set_key(WPA_ALG_NONE) failure in debug log
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 25 Oct 2016 21:22:49 +0000 (00:22 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 25 Oct 2016 21:41:04 +0000 (00:41 +0300)
This makes wpa_remove_ptk() call to wpa_auth_set_key() more consistent
with all the other calls that verify the return value to keep static
analyzers happier.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/wpa_auth.c

index 317e94505b01f1e1ad67e364def74220dc4441af..8039ca8e641d2facb7c7ac834ffb054ba9cacf37 100644 (file)
@@ -1673,7 +1673,10 @@ void wpa_remove_ptk(struct wpa_state_machine *sm)
 {
        sm->PTK_valid = FALSE;
        os_memset(&sm->PTK, 0, sizeof(sm->PTK));
-       wpa_auth_set_key(sm->wpa_auth, 0, WPA_ALG_NONE, sm->addr, 0, NULL, 0);
+       if (wpa_auth_set_key(sm->wpa_auth, 0, WPA_ALG_NONE, sm->addr, 0, NULL,
+                            0))
+               wpa_printf(MSG_DEBUG,
+                          "RSN: PTK removal from the driver failed");
        sm->pairwise_set = FALSE;
        eloop_cancel_timeout(wpa_rekey_ptk, sm->wpa_auth, sm);
 }