aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2011-11-24 20:15:25 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-28 14:44:07 -0500
commit0cfda8519c85eb279166fb55a8553ee66eac9b35 (patch)
tree55f917c9402c0164a76c80b4675ea173562a869f /net/mac80211/rx.c
parentdca7e9430cb3e492437a5ce891b8b3e315c147ca (diff)
mac80211: don't initiate path discovery when forwarding frame with unknown DA
We used to initiate a path discovery when receiving a frame for which there is no forwarding information. To cut down on PREQ spam, just send a (gated) PERR in response. Also separate path discovery logic from nexthop querying. This patch means we no longer queue frames when forwarding, so kill the PERR TX stuff in discard_frame(). Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 92fa95741761..f842f901d179 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1899,6 +1899,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1899 struct ieee80211_local *local = rx->local; 1899 struct ieee80211_local *local = rx->local;
1900 struct ieee80211_sub_if_data *sdata = rx->sdata; 1900 struct ieee80211_sub_if_data *sdata = rx->sdata;
1901 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); 1901 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
1902 __le16 reason = cpu_to_le16(WLAN_REASON_MESH_PATH_NOFORWARD);
1902 u16 q; 1903 u16 q;
1903 1904
1904 hdr = (struct ieee80211_hdr *) skb->data; 1905 hdr = (struct ieee80211_hdr *) skb->data;
@@ -1985,13 +1986,14 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
1985 fwded_mcast); 1986 fwded_mcast);
1986 memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN); 1987 memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
1987 } else { 1988 } else {
1988 int err; 1989 if (mesh_nexthop_lookup(fwd_skb, sdata)) {
1989 err = mesh_nexthop_lookup(fwd_skb, sdata); 1990 /* can't resolve next hop, send a PERR */
1990 /* Failed to immediately resolve next hop: 1991 mesh_path_error_tx(sdata->u.mesh.mshcfg.element_ttl,
1991 * fwded frame was dropped or will be added 1992 fwd_hdr->addr3, 0, reason,
1992 * later to the pending skb queue. */ 1993 fwd_hdr->addr2, sdata);
1993 if (err) 1994 sdata->u.mesh.mshstats.dropped_frames_no_route++;
1994 return RX_DROP_MONITOR; 1995 return RX_DROP_MONITOR;
1996 }
1995 1997
1996 IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh, 1998 IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
1997 fwded_unicast); 1999 fwded_unicast);