aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJavier Cardona <javier@cozybit.com>2012-10-24 15:43:30 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-25 07:51:29 -0400
commit555cb715be8ef98b8ec362b23dfc254d432a35b1 (patch)
tree5749dd089c51771c0d60b7c7018f79abd79a9096 /net/mac80211
parent9690fb169b433a66485c808e4fc352b8a0f8d866 (diff)
mac80211: Only process mesh config header on frames that RA_MATCH
Doing otherwise is wrong, and may wreak havoc on the mpp tables, specially if the frame is encrypted. Cc: stable@vger.kernel.org Reported-by: Chaoxing Lin <Chaoxing.Lin@ultra-3eti.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/rx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 61c621e9273f..1222127de9be 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1897,7 +1897,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1897 mesh_rmc_check(hdr->addr3, mesh_hdr, rx->sdata)) 1897 mesh_rmc_check(hdr->addr3, mesh_hdr, rx->sdata))
1898 return RX_DROP_MONITOR; 1898 return RX_DROP_MONITOR;
1899 1899
1900 if (!ieee80211_is_data(hdr->frame_control)) 1900 if (!ieee80211_is_data(hdr->frame_control) ||
1901 !(status->rx_flags & IEEE80211_RX_RA_MATCH))
1901 return RX_CONTINUE; 1902 return RX_CONTINUE;
1902 1903
1903 if (!mesh_hdr->ttl) 1904 if (!mesh_hdr->ttl)
@@ -1941,9 +1942,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1941 } 1942 }
1942 skb_set_queue_mapping(skb, q); 1943 skb_set_queue_mapping(skb, q);
1943 1944
1944 if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
1945 goto out;
1946
1947 if (!--mesh_hdr->ttl) { 1945 if (!--mesh_hdr->ttl) {
1948 IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl); 1946 IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
1949 return RX_DROP_MONITOR; 1947 return RX_DROP_MONITOR;