Skip to content

Commit 568b81f

Browse files
Fix incorrect snapshotting of MRP config by CASE client.
Right now, we snapshot the MRP config as part of the CASEClientInitParams during stack startup. After that, we will use that snapshotted config whenever we are the CASE initiator. This config will not match the parameters we use as CASE responder or advertise over DNS-SD if the local MRP configuration ever changes. Which for an ICD it can. The fix is to stop the incorrect snapshotting and get the information we need from the right source of truth when we need it.
1 parent 13622a3 commit 568b81f

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

src/app/CASEClient.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ CHIP_ERROR CASEClient::EstablishSession(const CASEClientInitParams & params, con
5050
VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL);
5151

5252
mCASESession.SetGroupDataProvider(params.groupDataProvider);
53+
// EstablishSession defaults to using the local MRP config, which is what we want.
5354
ReturnErrorOnFailure(mCASESession.EstablishSession(*params.sessionManager, params.fabricTable, peer, exchange,
5455
params.sessionResumptionStorage, params.certificateValidityPolicy, delegate,
55-
params.mrpLocalConfig));
56+
NullOptional));
5657

5758
return CHIP_NO_ERROR;
5859
}

src/app/CASEClient.h

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ struct CASEClientInitParams
3434
Messaging::ExchangeManager * exchangeMgr = nullptr;
3535
FabricTable * fabricTable = nullptr;
3636
Credentials::GroupDataProvider * groupDataProvider = nullptr;
37-
Optional<ReliableMessageProtocolConfig> mrpLocalConfig = Optional<ReliableMessageProtocolConfig>::Missing();
3837

3938
CHIP_ERROR Validate() const
4039
{

src/app/server/Server.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
313313
.exchangeMgr = &mExchangeMgr,
314314
.fabricTable = &mFabrics,
315315
.groupDataProvider = mGroupsProvider,
316-
.mrpLocalConfig = GetLocalMRPConfig(),
317316
},
318317
.clientPool = &mCASEClientPool,
319318
.sessionSetupPool = &mSessionSetupPool,

src/controller/CHIPDeviceControllerFactory.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params)
270270
.exchangeMgr = stateParams.exchangeMgr,
271271
.fabricTable = stateParams.fabricTable,
272272
.groupDataProvider = stateParams.groupDataProvider,
273-
.mrpLocalConfig = GetLocalMRPConfig(),
274273
};
275274

276275
CASESessionManagerConfig sessionManagerConfig = {

0 commit comments

Comments
 (0)