From: Vidyullatha Kanchanapally Date: Mon, 29 May 2017 11:13:37 +0000 (+0530) Subject: hostapd: Fix handling a 20/40 BSS Coexistence Management frame X-Git-Tag: hostap_2_7~1296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=115d5e2221344c59d92c4f094086aa0487a09abb;p=thirdparty%2Fhostap.git hostapd: Fix handling a 20/40 BSS Coexistence Management frame hostapd processes a received 20/40 BSS Coexistence management frame, but if no separate callbacks are registered for handling Public Action frames it eventually sends a reply with MSB of category code set to 1 thinking that the received frame is an invalid frame. This could happen based on whether hostapd was built and enabled with functionality using the callback functions. Fix this by explicitly returning 1 from the function when the 20/40 BSS Coexistence Management frame is processed. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index d15a70c59..062f546b7 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3448,6 +3448,7 @@ static int handle_action(struct hostapd_data *hapd, "HT20/40 coex mgmt frame received from STA " MACSTR, MAC2STR(mgmt->sa)); hostapd_2040_coex_action(hapd, mgmt, len); + return 1; } #endif /* CONFIG_IEEE80211N */ if (hapd->public_action_cb) {