]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT: Do not send PMK-R1 pull request to own R0KH address
authorJouni Malinen <jouni@codeaurora.org>
Sat, 24 Mar 2018 09:47:37 +0000 (11:47 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 24 Mar 2018 16:53:14 +0000 (18:53 +0200)
If the requested key is not available locally, there is no point in
trying to send a pull request back to self for the key.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/wpa_auth_ft.c

index 153752d1757f3b561cc4b80e8999f7cb371e23e2..5191ae090651dfafa16329da2893639b38943fc3 100644 (file)
@@ -1459,6 +1459,11 @@ static int wpa_ft_pull_pmk_r1(struct wpa_state_machine *sm,
                            sm->r0kh_id, sm->r0kh_id_len);
                return -1;
        }
+       if (os_memcmp(r0kh->addr, sm->wpa_auth->addr, ETH_ALEN) == 0) {
+               wpa_printf(MSG_DEBUG,
+                          "FT: R0KH-ID points to self - no matching key available");
+               return -1;
+       }
 
        key = r0kh->key;
        key_len = sizeof(r0kh->key);