]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix test-eapol fuzzing tool
authorJouni Malinen <j@w1.fi>
Sat, 1 Jun 2019 14:00:21 +0000 (17:00 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 2 Jun 2019 09:43:52 +0000 (12:43 +0300)
Update the tool to use the current API for WPA authenticator functions.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/test-eapol.c

index 57f2118e2bea170952829fbeb07c8dcc8a536214..0dd65e489ee47e07fe67c05e96ec7a21f99e8306 100644 (file)
@@ -396,12 +396,14 @@ static int auth_send_eapol(void *ctx, const u8 *addr, const u8 *data,
 
 static const u8 * auth_get_psk(void *ctx, const u8 *addr,
                               const u8 *p2p_dev_addr, const u8 *prev_psk,
-                              size_t *psk_len)
+                              size_t *psk_len, int *vlan_id)
 {
        struct wpa *wpa = ctx;
 
        wpa_printf(MSG_DEBUG, "AUTH: %s (addr=" MACSTR " prev_psk=%p)",
                   __func__, MAC2STR(addr), prev_psk);
+       if (vlan_id)
+               *vlan_id = 0;
        if (psk_len)
                *psk_len = PMK_LEN;
        if (prev_psk)
@@ -501,7 +503,7 @@ static int auth_init(struct wpa *wpa)
                return -1;
        }
 
-       if (wpa_validate_wpa_ie(wpa->auth_group, wpa->auth, wpa->supp_ie,
+       if (wpa_validate_wpa_ie(wpa->auth_group, wpa->auth, 2412, wpa->supp_ie,
                                wpa->supp_ie_len, NULL, 0, NULL, 0) !=
            WPA_IE_OK) {
                wpa_printf(MSG_DEBUG, "AUTH: wpa_validate_wpa_ie() failed");