diff options
Diffstat (limited to 'net/mac80211/mesh.c')
| -rw-r--r-- | net/mac80211/mesh.c | 17 | 
1 files changed, 8 insertions, 9 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 2a57cc02c61..c1299e24954 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -279,9 +279,9 @@ void mesh_mgmt_ies_add(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata)  	    MESHCONF_CAPAB_ACCEPT_PLINKS : 0x00;  	*pos++ = 0x00; -	if (sdata->u.mesh.vendor_ie) { -		int len = sdata->u.mesh.vendor_ie_len; -		const u8 *data = sdata->u.mesh.vendor_ie; +	if (sdata->u.mesh.ie) { +		int len = sdata->u.mesh.ie_len; +		const u8 *data = sdata->u.mesh.ie;  		if (skb_tailroom(skb) > len)  			memcpy(skb_put(skb, len), data, len);  	} @@ -573,6 +573,10 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,  	ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - baselen,  			       &elems); +	/* ignore beacons from secure mesh peers if our security is off */ +	if (elems.rsn_len && !sdata->u.mesh.is_secure) +		return; +  	if (elems.ds_params && elems.ds_params_len == 1)  		freq = ieee80211_channel_to_frequency(elems.ds_params[0], band);  	else @@ -586,9 +590,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,  	if (elems.mesh_id && elems.mesh_config &&  	    mesh_matches_local(&elems, sdata)) {  		supp_rates = ieee80211_sta_get_rates(local, &elems, band); - -		mesh_neighbour_update(mgmt->sa, supp_rates, sdata, -				      mesh_peer_accepts_plinks(&elems)); +		mesh_neighbour_update(mgmt->sa, supp_rates, sdata, &elems);  	}  } @@ -611,12 +613,9 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,  				   struct sk_buff *skb)  {  	struct ieee80211_rx_status *rx_status; -	struct ieee80211_if_mesh *ifmsh;  	struct ieee80211_mgmt *mgmt;  	u16 stype; -	ifmsh = &sdata->u.mesh; -  	rx_status = IEEE80211_SKB_RXCB(skb);  	mgmt = (struct ieee80211_mgmt *) skb->data;  	stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE;  |