From 1dd7f11ae7c2688050496202729e7de1f703672c Mon Sep 17 00:00:00 2001 From: Kangping Date: Mon, 10 Mar 2025 23:54:38 +0800 Subject: [PATCH] [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. --- src/core/net/srp_server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/net/srp_server.cpp b/src/core/net/srp_server.cpp index bb090043f..a67bd36e2 100644 --- a/src/core/net/srp_server.cpp +++ b/src/core/net/srp_server.cpp @@ -325,7 +325,8 @@ bool Server::NetDataContainsOtherSrpServers(void) const while (Get().GetNextDnsSrpUnicastInfo( iterator, NetworkData::Service::kAddrInServerData, unicastInfo) == kErrorNone) { - if (!Get().HasRloc16(unicastInfo.mRloc16)) + if (!Get().HasRloc16(unicastInfo.mRloc16) && + Get().GetMeshLocalEid() != unicastInfo.mSockAddr.GetAddress()) { contains = true; ExitNow();