DPP2: Fix Authentication Request destination in the chirping case
The Authentication Request frames triggered by the reception of a Presence Announcement frame were sent to the broadcast address. This is not correct behavior since the source MAC address of the Presence Announcement frame was supposed to override the Responder MAC address. Fix this by using that source MAC address to avoid unnecessary use of broadcast frames. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
598f671321
commit
ad59639ed8
2 changed files with 12 additions and 6 deletions
|
@ -495,7 +495,9 @@ static int hostapd_dpp_auth_init_next(struct hostapd_data *hapd)
|
|||
freq = auth->freq[auth->freq_idx++];
|
||||
auth->curr_freq = freq;
|
||||
|
||||
if (is_zero_ether_addr(auth->peer_bi->mac_addr))
|
||||
if (!is_zero_ether_addr(auth->peer_mac_addr))
|
||||
dst = auth->peer_mac_addr;
|
||||
else if (is_zero_ether_addr(auth->peer_bi->mac_addr))
|
||||
dst = broadcast;
|
||||
else
|
||||
dst = auth->peer_bi->mac_addr;
|
||||
|
@ -1299,8 +1301,9 @@ hostapd_dpp_rx_presence_announcement(struct hostapd_data *hapd, const u8 *src,
|
|||
|
||||
auth->neg_freq = freq;
|
||||
|
||||
if (!is_zero_ether_addr(peer_bi->mac_addr))
|
||||
os_memcpy(auth->peer_mac_addr, peer_bi->mac_addr, ETH_ALEN);
|
||||
/* The source address of the Presence Announcement frame overrides any
|
||||
* MAC address information from the bootstrapping information. */
|
||||
os_memcpy(auth->peer_mac_addr, src, ETH_ALEN);
|
||||
|
||||
hapd->dpp_auth = auth;
|
||||
if (hostapd_dpp_auth_init_next(hapd) < 0) {
|
||||
|
|
|
@ -709,7 +709,9 @@ static int wpas_dpp_auth_init_next(struct wpa_supplicant *wpa_s)
|
|||
freq = auth->freq[auth->freq_idx++];
|
||||
auth->curr_freq = freq;
|
||||
|
||||
if (is_zero_ether_addr(auth->peer_bi->mac_addr))
|
||||
if (!is_zero_ether_addr(auth->peer_mac_addr))
|
||||
dst = auth->peer_mac_addr;
|
||||
else if (is_zero_ether_addr(auth->peer_bi->mac_addr))
|
||||
dst = broadcast;
|
||||
else
|
||||
dst = auth->peer_bi->mac_addr;
|
||||
|
@ -2056,8 +2058,9 @@ wpas_dpp_rx_presence_announcement(struct wpa_supplicant *wpa_s, const u8 *src,
|
|||
|
||||
auth->neg_freq = freq;
|
||||
|
||||
if (!is_zero_ether_addr(peer_bi->mac_addr))
|
||||
os_memcpy(auth->peer_mac_addr, peer_bi->mac_addr, ETH_ALEN);
|
||||
/* The source address of the Presence Announcement frame overrides any
|
||||
* MAC address information from the bootstrapping information. */
|
||||
os_memcpy(auth->peer_mac_addr, src, ETH_ALEN);
|
||||
|
||||
wpa_s->dpp_auth = auth;
|
||||
if (wpas_dpp_auth_init_next(wpa_s) < 0) {
|
||||
|
|
Loading…
Reference in a new issue