Skip to content

Commit e26c094

Browse files
nbd168jmberg-intel
authored andcommitted
wifi: mac80211: fix receiving mesh packets in forwarding=0 networks
When forwarding is set to 0, frames are typically sent with ttl=1. Move the ttl decrement check below the check for local receive in order to fix packet drops. Reported-by: Thomas Hühn <[email protected]> Reported-by: Nick Hainke <[email protected]> Fixes: 986e43b ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") Signed-off-by: Felix Fietkau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent dd01579 commit e26c094

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

net/mac80211/rx.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,14 +2769,6 @@ ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta
27692769
if (sdata->crypto_tx_tailroom_needed_cnt)
27702770
tailroom = IEEE80211_ENCRYPT_TAILROOM;
27712771

2772-
if (!--mesh_hdr->ttl) {
2773-
if (multicast)
2774-
goto rx_accept;
2775-
2776-
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
2777-
return RX_DROP_MONITOR;
2778-
}
2779-
27802772
if (mesh_hdr->flags & MESH_FLAGS_AE) {
27812773
struct mesh_path *mppath;
27822774
char *proxied_addr;
@@ -2807,6 +2799,14 @@ ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta
28072799
if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
28082800
goto rx_accept;
28092801

2802+
if (!--mesh_hdr->ttl) {
2803+
if (multicast)
2804+
goto rx_accept;
2805+
2806+
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
2807+
return RX_DROP_MONITOR;
2808+
}
2809+
28102810
if (!ifmsh->mshcfg.dot11MeshForwarding) {
28112811
if (is_multicast_ether_addr(eth->h_dest))
28122812
goto rx_accept;

0 commit comments

Comments
 (0)