mirror of
https://github.com/espressif/openthread.git
synced 2026-10-02 13:57:38 +00:00
[network-data] fix how the OnMeshPrefixConfig structs are compared (#4312)
This commit ensures the entire struct size is used when comparing two `OnMeshPrefixConfig` (`otBorderRouterConfig`) instances from `NetworkData::ContainsOnMeshPrefixes()` method.
This commit is contained in:
committed by
Jonathan Hui
parent
badae65876
commit
be28486fb7
@@ -386,7 +386,7 @@ bool NetworkData::ContainsOnMeshPrefixes(NetworkData &aCompare, uint16_t aRloc16
|
|||||||
|
|
||||||
while ((error = GetNextOnMeshPrefix(innerIterator, aRloc16, innerConfig)) == OT_ERROR_NONE)
|
while ((error = GetNextOnMeshPrefix(innerIterator, aRloc16, innerConfig)) == OT_ERROR_NONE)
|
||||||
{
|
{
|
||||||
if (memcmp(&outerConfig, &innerConfig, (sizeof(outerConfig) - sizeof(outerConfig.mRloc16))) == 0)
|
if (memcmp(&outerConfig, &innerConfig, sizeof(outerConfig)) == 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user