]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P Manager: Use send_mlme() instead of send_frame() for Deauthentication
authorJouni Malinen <j@w1.fi>
Fri, 3 Jan 2020 11:22:32 +0000 (13:22 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 3 Jan 2020 11:22:32 +0000 (13:22 +0200)
send_frame() is documented to be used for "testing use only" and as
such, it should not have used here for a normal production
functionality. Replace this with use of send_mlme() which is already
used for sending Deauthentication frames in other cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ctrl_iface_ap.c

index 9fd1b81a2927224bb6634b40024b9a819c8f4804..73238f2c5cdbafdd73de0ad12e24d98733a34558 100644 (file)
@@ -462,9 +462,6 @@ static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
        int ret;
        u8 *pos;
 
-       if (!hapd->drv_priv || !hapd->driver->send_frame)
-               return -1;
-
        mgmt = os_zalloc(sizeof(*mgmt) + 100);
        if (mgmt == NULL)
                return -1;
@@ -498,8 +495,7 @@ static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
        pos += 2;
        *pos++ = minor_reason_code;
 
-       ret = hapd->driver->send_frame(hapd->drv_priv, (u8 *) mgmt,
-                                      pos - (u8 *) mgmt, 1);
+       ret = hostapd_drv_send_mlme(hapd, mgmt, pos - (u8 *) mgmt, 0);
        os_free(mgmt);
 
        return ret < 0 ? -1 : 0;