summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-10-07 10:53:09 +0200
committerStefan Schmidt <stefan@datenfreihafen.org>2022-10-12 12:57:26 +0200
commit0218277df5a527c9e9474aa0e4e4e2f4bbc6f5cc (patch)
tree2e95e1e6497a1d15b4db0f4ebdde92c2d6887720
parenta4b5b4c56dd8b1dd46b2f13cb09f5f8031978f86 (diff)
mac802154: Avoid delivering frames received in a non satisfying filtering mode
We must avoid the situation where one interface disables address filtering and AACK on the PHY while another interface expects to run with AACK and address filtering enabled. Just ignore the frames on the concerned interface if this happens. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Alexander Aring <aahringo@redhat.com> Link: https://lore.kernel.org/r/20221007085310.503366-8-miquel.raynal@bootlin.com Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
-rw-r--r--net/mac802154/rx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 80dd52bc6bf1..6640bd237352 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -209,6 +209,13 @@ __ieee802154_rx_handle_packet(struct ieee802154_local *local,
if (!ieee802154_sdata_running(sdata))
continue;
+ /* Do not deliver packets received on interfaces expecting
+ * AACK=1 if the address filters where disabled.
+ */
+ if (local->hw.phy->filtering < IEEE802154_FILTERING_4_FRAME_FIELDS &&
+ sdata->required_filtering == IEEE802154_FILTERING_4_FRAME_FIELDS)
+ continue;
+
ieee802154_subif_frame(sdata, skb, &hdr);
skb = NULL;
break;
@@ -268,11 +275,6 @@ void ieee802154_rx(struct ieee802154_local *local, struct sk_buff *skb)
ieee802154_monitors_rx(local, skb);
- /* TODO: Avoid delivering frames received at the level
- * IEEE802154_FILTERING_NONE on interfaces not expecting it because of
- * the missing auto ACK handling feature.
- */
-
/* TODO: Handle upcomming receive path where the PHY is at the
* IEEE802154_FILTERING_NONE level during a scan.
*/