[PATCH 10/12] mesh: Cancel remaining timers to avoid segmentation fault

Bob Copeland me
Tue Nov 4 06:02:37 PST 2014


On Tue, Nov 04, 2014 at 02:36:51PM +0900, Masashi Honma wrote:
>  void mesh_mpm_deinit(struct wpa_supplicant *wpa_s, struct hostapd_iface *ifmsh)
>  {
>  	struct hostapd_data *hapd = ifmsh->bss[0];
> +	struct sta_info *sta;
> +
> +	sta = hapd->sta_list;
> +
> +	while (sta) {
> +		eloop_cancel_timeout(plink_timer, wpa_s, sta);
> +		wpa_printf(MSG_DEBUG, "Canceling plink_timer " MACSTR,
> +			   MAC2STR(sta->addr));
> +		sta = sta->next;
> +	}
>  
>  	/* notify peers we're leaving */
>  	ap_for_each_sta(hapd, mesh_mpm_plink_close, wpa_s);

in mesh_mpm_free_sta() we do:

void mesh_mpm_free_sta(struct sta_info *sta)
{
        eloop_cancel_timeout(plink_timer, ELOOP_ALL_CTX, sta);
        eloop_cancel_timeout(mesh_auth_timer, ELOOP_ALL_CTX, sta);
}

Is there a path where we aren't calling this?

-- 
Bob Copeland %% www.bobcopeland.com



More information about the Hostap mailing list