From: Jouni Malinen Date: Fri, 2 Jul 2010 05:57:03 +0000 (-0700) Subject: P2P: Allow pre-authorization of invitation to apply to src addr X-Git-Tag: hostap-1-bp~1107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=131cb37c2d335a71828e576db5d5a50ef56e838e;p=thirdparty%2Fhostap.git P2P: Allow pre-authorization of invitation to apply to src addr For client-invites-device case, the pre-authorization of an invitation to running group will need to allow Invitation Request from specified address, too. This is for testing uses only. --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 60e3bafc1..a3315d328 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1707,8 +1707,9 @@ static u8 wpas_invitation_process(void *ctx, const u8 *sa, const u8 *bssid, wpa_printf(MSG_DEBUG, "P2P: Invitation from " MACSTR " to join an active group", MAC2STR(sa)); if (!is_zero_ether_addr(wpa_s->p2p_auth_invite) && - os_memcmp(go_dev_addr, wpa_s->p2p_auth_invite, ETH_ALEN) == - 0) { + (os_memcmp(go_dev_addr, wpa_s->p2p_auth_invite, ETH_ALEN) + == 0 || + os_memcmp(sa, wpa_s->p2p_auth_invite, ETH_ALEN) == 0)) { wpa_printf(MSG_DEBUG, "P2P: Accept previously " "authorized invitation"); goto accept_inv;