Cumulative patch from commit d015bb05df1e1c2b12060bd7ffa51dc980585f4f
d015bb0 Move network add/remove operations to a common function
052b8d3 mesh: Report HT operation mode to kernel
2bd6217 mesh: Use WPA_DRIVER_MESH_CONF_FLAG_* as modification flag
4ffb3f8 mesh: Do NL80211_MESHCONF_* setting in single function
a1431ef mesh: Move max_peer_links parameter to appropriate struct
72a652d IAPP: Set SO_REUSEADDR on listening socket
9d5d1c5 Add init fragment for hostapd on Android
ecba450 mesh: Simplify HT40 check code
05aed43 mesh: Set correct secondary channel offset if HT40 is disabled
81372e3 ap: Use is_multicast_ether_addr() more
647862e nl80211: Remove duplicated check in nl80211_setup_ap()
e3429c0 nl80211: Fix control port protocol no-encrypt setting
Change-Id: Icaa3ad65fcf69a347e71c5f1953a29a47a8ab178
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 555a731..eed5483 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -2557,8 +2557,9 @@
"handle_action - unknown action category %d or invalid "
"frame",
mgmt->u.action.category);
- if (!(mgmt->da[0] & 0x01) && !(mgmt->u.action.category & 0x80) &&
- !(mgmt->sa[0] & 0x01)) {
+ if (!is_multicast_ether_addr(mgmt->da) &&
+ !(mgmt->u.action.category & 0x80) &&
+ !is_multicast_ether_addr(mgmt->sa)) {
struct ieee80211_mgmt *resp;
/*
@@ -2901,7 +2902,7 @@
size_t len, int ok)
{
struct sta_info *sta;
- if (mgmt->da[0] & 0x01)
+ if (is_multicast_ether_addr(mgmt->da))
return;
sta = ap_get_sta(hapd, mgmt->da);
if (!sta) {
@@ -2925,7 +2926,7 @@
size_t len, int ok)
{
struct sta_info *sta;
- if (mgmt->da[0] & 0x01)
+ if (is_multicast_ether_addr(mgmt->da))
return;
sta = ap_get_sta(hapd, mgmt->da);
if (!sta) {
@@ -3130,7 +3131,7 @@
wpa_printf(MSG_DEBUG, "Data/PS-poll frame from not associated STA "
MACSTR, MAC2STR(src));
- if (src[0] & 0x01) {
+ if (is_multicast_ether_addr(src)) {
/* Broadcast bit set in SA?! Ignore the frame silently. */
return;
}