@@ -205,10 +205,10 @@ __ieee802154_rx_handle_packet(struct ieee802154_local *local,
}
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
- if (sdata->wpan_dev.iftype != NL802154_IFTYPE_NODE)
+ if (!ieee802154_sdata_running(sdata))
continue;
- if (!ieee802154_sdata_running(sdata))
+ if (sdata->required_filtering == IEEE802154_FILTERING_NONE)
continue;
ieee802154_subif_frame(sdata, skb, &hdr);
@@ -231,10 +231,10 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb)
skb->protocol = htons(ETH_P_IEEE802154);
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
- if (sdata->wpan_dev.iftype != NL802154_IFTYPE_MONITOR)
+ if (!ieee802154_sdata_running(sdata))
continue;
- if (!ieee802154_sdata_running(sdata))
+ if (sdata->required_filtering > IEEE802154_FILTERING_NONE)
continue;
skb2 = skb_clone(skb, GFP_ATOMIC);
Historically, only monitors were using promiscuous mode and this promiscuous mode was not the one from the spec but actually implied no filtering at all (sniffers). Now that we have a more fine grained approach, we can ensure all interfaces which would be expecting no filter at all could get it without being a monitor interface. Having this in place will allow us to clarify the additional software checks compared to the hardware capabilities. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- net/mac802154/rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)