mirror of
https://github.com/espressif/openthread.git
synced 2026-08-19 17:09:51 +00:00
Update IsValid() for ConnectivityTlv due to optional SED Buffer Size and Datagram Count (#1624)
This commit is contained in:
@@ -1014,7 +1014,8 @@ public:
|
||||
* @retval FALSE If the TLV does not appear to be well-formed.
|
||||
*
|
||||
*/
|
||||
bool IsValid(void) const { return GetLength() == sizeof(*this) - sizeof(Tlv); }
|
||||
bool IsValid(void) const { return (GetLength() == sizeof(*this) - sizeof(Tlv) ||
|
||||
GetLength() == sizeof(*this) - sizeof(Tlv) - sizeof(mSedBufferSize) - sizeof(mSedDatagramCount)); }
|
||||
|
||||
/**
|
||||
* This method returns the Parent Priority value.
|
||||
|
||||
@@ -349,7 +349,8 @@ public:
|
||||
* @retval FALSE If the TLV does not appear to be well-formed.
|
||||
*
|
||||
*/
|
||||
bool IsValid(void) const { return GetLength() == sizeof(*this) - sizeof(NetworkDiagnosticTlv); }
|
||||
bool IsValid(void) const { return (GetLength() == sizeof(*this) - sizeof(NetworkDiagnosticTlv) ||
|
||||
GetLength() == sizeof(*this) - sizeof(NetworkDiagnosticTlv) - sizeof(mSedBufferSize) - sizeof(mSedDatagramCount)); }
|
||||
|
||||
/**
|
||||
* This method returns the Parent Priority value.
|
||||
|
||||
Reference in New Issue
Block a user