wireless/ieee802154: Fixes issue with wrong information being sent in a rejected association response frame

This commit is contained in:
Anthony Merlino
2017-06-15 13:01:19 -04:00
parent 77757410c8
commit ca30b6c02a
2 changed files with 21 additions and 3 deletions
+9 -1
View File
@@ -374,7 +374,15 @@ int mac802154_resp_associate(MACHANDLE mac,
/* Copy in the assigned short address */
memcpy(&iob->io_data[iob->io_len], &resp->assocsaddr, 2);
if (resp->status == IEEE802154_STATUS_SUCCESS)
{
memcpy(&iob->io_data[iob->io_len], &resp->assocsaddr, 2);
}
else
{
u16 = (FAR uint16_t *)&iob->io_data[iob->io_len];
*u16 = IEEE802154_SADDR_UNSPEC;
}
iob->io_len += 2;
/* Copy in the association status */