mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
mac802154: Only allow PAN controllers to process association requests
It is not very clear in the specification whether simple coordinators are allowed or not to answer to association requests themselves. As there is no synchronization mechanism, it is probably best to rely on the relay feature of these coordinators and avoid processing them in this case. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> Acked-by: Alexander Aring <aahringo@redhat.com> Link: https://lore.kernel.org/linux-wpan/20231128111655.507479-4-miquel.raynal@bootlin.com
This commit is contained in:
@@ -781,6 +781,12 @@ int mac802154_process_association_req(struct ieee802154_sub_if_data *sdata,
|
||||
unlikely(dest->short_addr != wpan_dev->short_addr))
|
||||
return -ENODEV;
|
||||
|
||||
if (wpan_dev->parent) {
|
||||
dev_dbg(&sdata->dev->dev,
|
||||
"Ignoring ASSOC REQ, not the PAN coordinator\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
mutex_lock(&wpan_dev->association_lock);
|
||||
|
||||
memcpy(&assoc_req_pl, skb->data, sizeof(assoc_req_pl));
|
||||
|
||||
Reference in New Issue
Block a user