diff --git a/src/core/thread/meshcop_tlvs.hpp b/src/core/thread/meshcop_tlvs.hpp index b2638633e..8d3b8267c 100644 --- a/src/core/thread/meshcop_tlvs.hpp +++ b/src/core/thread/meshcop_tlvs.hpp @@ -942,7 +942,7 @@ public: * This method initializes the TLV. * */ - void Init(void) { SetType(kActiveTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); } + void Init(void) { SetType(kActiveTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); Timestamp::Init(); } /** * This method indicates whether or not the TLV appears to be well-formed. @@ -1192,7 +1192,7 @@ public: * This method initializes the TLV. * */ - void Init(void) { SetType(kPendingTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); } + void Init(void) { SetType(kPendingTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); Timestamp::Init(); } /** * This method indicates whether or not the TLV appears to be well-formed. diff --git a/src/core/thread/mle_tlvs.hpp b/src/core/thread/mle_tlvs.hpp index d5c0e2c46..4db4286d8 100644 --- a/src/core/thread/mle_tlvs.hpp +++ b/src/core/thread/mle_tlvs.hpp @@ -1567,7 +1567,11 @@ public: * This method initializes the TLV. * */ - void Init(void) { SetType(Mle::Tlv::kActiveTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); } + void Init(void) { + SetType(Mle::Tlv::kActiveTimestamp); + SetLength(sizeof(*this) - sizeof(Tlv)); + Timestamp::Init(); + } /** * This method indicates whether or not the TLV appears to be well-formed. @@ -1591,7 +1595,11 @@ public: * This method initializes the TLV. * */ - void Init(void) { SetType(Mle::Tlv::kPendingTimestamp); SetLength(sizeof(*this) - sizeof(Tlv)); } + void Init(void) { + SetType(Mle::Tlv::kPendingTimestamp); + SetLength(sizeof(*this) - sizeof(Tlv)); + Timestamp::Init(); + } /** * This method indicates whether or not the TLV appears to be well-formed.