[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:
Abtin Keshavarzian
2019-11-14 20:23:56 -08:00
committed by Jonathan Hui
parent badae65876
commit be28486fb7
+1 -1
View File
@@ -386,7 +386,7 @@ bool NetworkData::ContainsOnMeshPrefixes(NetworkData &aCompare, uint16_t aRloc16
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;
}