Browse Source

Do not send Deauth/Disassoc to unknown STA if SA is invalid

The frame needs to be sent from an individual (non-group) address,
so drop invalid frames before sending Deauth/Disassoc frames to
not associated STAs.
Jouni Malinen 14 years ago
parent
commit
1df492df34
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/ap/ieee802_11.c

+ 5 - 0
src/ap/ieee802_11.c

@@ -1804,6 +1804,11 @@ void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src,
 
 	wpa_printf(MSG_DEBUG, "Data/PS-poll frame from not associated STA "
 		   MACSTR, MAC2STR(src));
+	if (src[0] & 0x01) {
+		/* Broadcast bit set in SA?! Ignore the frame silently. */
+		return;
+	}
+
 	if (sta && (sta->flags & WLAN_STA_AUTH))
 		hostapd_drv_sta_disassoc(
 			hapd, src,