Do not add P2P IE into Beacon/Probe Response if P2P is disabled
P2P IE was incorrectly added in wpa_supplicant AP mode even if P2P function was not actually enabled. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
04ed4e984e
commit
adc33680e3
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
||||||
#include "wps/wps_i.h"
|
#include "wps/wps_i.h"
|
||||||
#include "p2p/p2p.h"
|
#include "p2p/p2p.h"
|
||||||
#include "ap/hostapd.h"
|
#include "ap/hostapd.h"
|
||||||
|
#include "ap/ap_config.h"
|
||||||
#include "ap/p2p_hostapd.h"
|
#include "ap/p2p_hostapd.h"
|
||||||
#include "eapol_supp/eapol_supp_sm.h"
|
#include "eapol_supp/eapol_supp_sm.h"
|
||||||
#include "rsn_supp/wpa.h"
|
#include "rsn_supp/wpa.h"
|
||||||
|
@ -3176,6 +3177,11 @@ static void wpas_p2p_ie_update(void *ctx, struct wpabuf *beacon_ies,
|
||||||
struct wpa_supplicant *wpa_s = ctx;
|
struct wpa_supplicant *wpa_s = ctx;
|
||||||
if (wpa_s->ap_iface) {
|
if (wpa_s->ap_iface) {
|
||||||
struct hostapd_data *hapd = wpa_s->ap_iface->bss[0];
|
struct hostapd_data *hapd = wpa_s->ap_iface->bss[0];
|
||||||
|
if (!(hapd->conf->p2p & P2P_GROUP_OWNER)) {
|
||||||
|
wpabuf_free(beacon_ies);
|
||||||
|
wpabuf_free(proberesp_ies);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (beacon_ies) {
|
if (beacon_ies) {
|
||||||
wpabuf_free(hapd->p2p_beacon_ie);
|
wpabuf_free(hapd->p2p_beacon_ie);
|
||||||
hapd->p2p_beacon_ie = beacon_ies;
|
hapd->p2p_beacon_ie = beacon_ies;
|
||||||
|
|
Loading…
Reference in a new issue