mirror of
https://github.com/espressif/openthread.git
synced 2026-09-17 22:50:07 +00:00
[mac-frame] handle exception case for payload of mac cmd (#5499)
In current Mac::Frame implementation, when the frame is a Mac command, the CommandId is always not included as its private payload, which means we won't encrypt the CommandId. In most cases the Private Payload(things we need to encrypt) shall be set to the MAC Payload field(For Mac cmd, this field includes CommandId, shown in Figure 7-17) and the Open Payload shall be empty. The only 2 exception cases are listed in Table 9-1. So for Mac command with version >= 2, its CommandId should be included in Private Payload and should be encrypted when necessary. For Mac command with version < 2, CommandId should be in included in Open Payload and shouldn't be encrypted. This commit fixes this problem and adds unit tests for this.
This commit is contained in:
@@ -163,7 +163,6 @@ do_unit()
|
||||
|
||||
if [[ ${THREAD_VERSION} == "1.2" ]]; then
|
||||
do_unit_version "1.2-bbr"
|
||||
do_unit_version "1.1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user