[srp-server] fix fast-start mode disruption when device role changes (#11330) When in fast-start mode, the SRP server will be disabled and then immediately enabled again if the device transfers from Child to Router. This commit fixes this issue by also matching the MLE-ID with the SRP server address in the Network Data. (cherry picked from commit 1dd7f11ae7c2688050496202729e7de1f703672c) Change-Id: I235324e36482bcb59f359971221e2ae6009f7372
diff --git a/src/core/net/srp_server.cpp b/src/core/net/srp_server.cpp index bb09004..a67bd36 100644 --- a/src/core/net/srp_server.cpp +++ b/src/core/net/srp_server.cpp
@@ -325,7 +325,8 @@ while (Get<NetworkData::Service::Manager>().GetNextDnsSrpUnicastInfo( iterator, NetworkData::Service::kAddrInServerData, unicastInfo) == kErrorNone) { - if (!Get<Mle::Mle>().HasRloc16(unicastInfo.mRloc16)) + if (!Get<Mle::Mle>().HasRloc16(unicastInfo.mRloc16) && + Get<Mle::Mle>().GetMeshLocalEid() != unicastInfo.mSockAddr.GetAddress()) { contains = true; ExitNow();