[mle] add constant kMleSecurityTagSize for MLE security tag size (#5015)

This commit is contained in:
Abtin Keshavarzian
2020-05-28 22:02:22 -07:00
committed by Jonathan Hui
parent 19e2d148a1
commit 456cdf3091
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -2520,7 +2520,7 @@ otError Mle::SendMessage(Message &aMessage, const Ip6::Address &aDestination)
Header header;
uint32_t keySequence;
uint8_t nonce[Crypto::AesCcm::kNonceSize];
uint8_t tag[4];
uint8_t tag[kMleSecurityTagSize];
Crypto::AesCcm aesCcm;
uint8_t buf[64];
uint16_t length;
@@ -2605,14 +2605,14 @@ void Mle::HandleUdpReceive(Message &aMessage, const Ip6::MessageInfo &aMessageIn
uint32_t keySequence;
const Key * mleKey;
uint32_t frameCounter;
uint8_t messageTag[4];
uint8_t messageTag[kMleSecurityTagSize];
uint8_t nonce[Crypto::AesCcm::kNonceSize];
Mac::ExtAddress macAddr;
Crypto::AesCcm aesCcm;
uint16_t mleOffset;
uint8_t buf[64];
uint16_t length;
uint8_t tag[4];
uint8_t tag[kMleSecurityTagSize];
uint8_t command;
Neighbor * neighbor;
+2 -1
View File
@@ -1650,7 +1650,8 @@ protected:
private:
enum
{
kMleHopLimit = 255,
kMleHopLimit = 255,
kMleSecurityTagSize = 4, // Security tag size in bytes.
// Parameters related to "periodic parent search" feature (CONFIG_ENABLE_PERIODIC_PARENT_SEARCH).
// All timer intervals are converted to milliseconds.