[PATCHv2 2/3] Register for AUTH frames when joining an IBSS network

Johannes Berg johannes at sipsolutions.net
Wed Nov 13 11:40:32 EST 2013


On Wed, 2013-11-13 at 17:37 +0100, Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio at open-mesh.com>
> 
> In order to correctly handle IBSS/RSN, wpa_s has to register
> for any incoming AUTH message so to properly react when
> those are received.

> @@ -1814,12 +1817,19 @@ static void mlme_event_michael_mic_failure(struct i802_bss *bss,
>  static void mlme_event_join_ibss(struct wpa_driver_nl80211_data *drv,
>  				 struct nlattr *tb[])
>  {
> +	u16 type = (WLAN_FC_TYPE_MGMT << 2) | (WLAN_FC_STYPE_AUTH << 4);
> +
>  	if (tb[NL80211_ATTR_MAC] == NULL) {
>  		wpa_printf(MSG_DEBUG, "nl80211: No address in IBSS joined "
>  			   "event");
>  		return;
>  	}
>  	os_memcpy(drv->bssid, nla_data(tb[NL80211_ATTR_MAC]), ETH_ALEN);
> +
> +	/* register for any AUTH message */
> +	nl80211_register_frame(&drv->first_bss, drv->first_bss.nl_mgmt,
> +			       type, NULL, 0);

This will crash.

johannes



More information about the HostAP mailing list