Skip to content

Commit

Permalink
Fix Session ID Allocation (#16895)
Browse files Browse the repository at this point in the history
* Fix Session ID Allocation

Secure session ID allocation currently suffers the following problems:

* fragmentation has worst case behavior where there may be as few as
  2 outstanding sessions, but the allocator will become full
* there is no formal coupling to the session manager object, but
  yet there can only be one allocator per session manager; the
  current solution is for the allocator to share static state
* IDs are proposed *to* the session manager, which means the session
  manager can only prevent collisions by failing on session creation
  or by evicting sessions; it currently does the latter
* session ID allocation is manual, so leaks are likely

This commit solves these problems by moving ID allocation into the
session manager and by leveraging the session table itself as the
source of truth for available IDs.  Whereas the old flow was:

* allocate session ID
* initiate PASE or CASE
* (on success) allocate session table entry

The new flow is:

* allocate session table entry with non-colliding ID
* initiate PASE or CASE
* activate the session in the table

Allocation uses a next-session-ID clue, which is 1 more than the most
recent allocation, and also searches the session table to make sure
a non-colliding value is returned.  Allocation time complexity is
O(kMaxSessionCount^2/64) in the current implementation.

Lifecycle of the pending session table entries also leverages the
SessionHolder object to alleviate our need to manually free resources.

Fixes: #7835, #12821

Testing:

* Added an allocation test to TestSessionManager
* All other code paths are heavily integrated into existing tests
* All existing unit tests pass

* fix Werror=conversion

* fix VerifyOrExit lint error

* fix Werror=unused-but-set-variable with detail logging disabled

* fix tv-casting-app build

* pass SessionHolder by reference to reduce stack size

* bypass -Wstack-usage= in TestPASESession to fix spurious stack warning

* Update src/transport/SecureSession.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/transport/SecureSessionTable.h

Co-authored-by: Boris Zbarsky <[email protected]>

* per bzbarsky-apple, document that allocation of sessions to caller-specified IDs is for testing

* Update src/transport/PairingSession.h

Co-authored-by: Boris Zbarsky <[email protected]>

* per mrjerryjohns, delegate allocation of secure sessions to base PairingSession object

* remove use of Optional<uint16_t> session IDs

Overloads make this superfluous.

* init session ID randomly; add more checks for invalid 0 session ID

* Update src/transport/PairingSession.h

Co-authored-by: Boris Zbarsky <[email protected]>

* per bzbarsky-apple, pass reference type to SessionHolderWithDelegate

* restyle

* per kghost, pass SessionHandle, not SessionHolder

* make sure to grab the session in NewPairing

* fixup doxy params

* fix up comments

* add a test case to verify the session ID allocator does not have collisions

* reduce number of session ID allocator collision test iterations to fix CI timeout

* fix loop sentinel in TestSessionManager

* increase gcc_debug test phase timeout

* increase gcc-debug total timeout to 65 minutes

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Sep 7, 2023
1 parent 0d9b5ad commit 9614241
Show file tree
Hide file tree
Showing 43 changed files with 578 additions and 678 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ concurrency:
jobs:
build_linux_gcc_debug:
name: Build on Linux (gcc_debug)
timeout-minutes: 60
timeout-minutes: 65

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
timeout-minutes: 20
run: scripts/run_in_build_env.sh "ninja -C ./out"
- name: Run Tests
timeout-minutes: 10
timeout-minutes: 15
run: scripts/tests/gn_tests.sh
# TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227
# TODO https://github.com/project-chip/connectedhomeip/issues/1512
Expand Down
1 change: 0 additions & 1 deletion examples/tv-casting-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ class TargetVideoPlayerInfo
chip::DeviceProxyInitParams initParams = {
.sessionManager = &(server->GetSecureSessionManager()),
.exchangeMgr = &(server->GetExchangeManager()),
.idAllocator = &(server->GetSessionIDAllocator()),
.fabricTable = &(server->GetFabricTable()),
.clientPool = &gCASEClientPool,
};
Expand Down
9 changes: 2 additions & 7 deletions src/app/CASEClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ CHIP_ERROR CASEClient::EstablishSession(PeerId peer, const Transport::PeerAddres
Optional<SessionHandle> session = mInitParams.sessionManager->CreateUnauthenticatedSession(peerAddress, mrpConfig);
VerifyOrReturnError(session.HasValue(), CHIP_ERROR_NO_MEMORY);

uint16_t keyID = 0;
ReturnErrorOnFailure(mInitParams.idAllocator->Allocate(keyID));

// Allocate the exchange immediately before calling CASESession::EstablishSession.
//
// CASESession::EstablishSession takes ownership of the exchange and will
Expand All @@ -48,8 +45,8 @@ CHIP_ERROR CASEClient::EstablishSession(PeerId peer, const Transport::PeerAddres
VerifyOrReturnError(exchange != nullptr, CHIP_ERROR_INTERNAL);

mCASESession.SetGroupDataProvider(mInitParams.groupDataProvider);
ReturnErrorOnFailure(mCASESession.EstablishSession(peerAddress, mInitParams.fabricInfo, peer.GetNodeId(), keyID, exchange, this,
mInitParams.mrpLocalConfig));
ReturnErrorOnFailure(mCASESession.EstablishSession(*mInitParams.sessionManager, peerAddress, mInitParams.fabricInfo,
peer.GetNodeId(), exchange, this, mInitParams.mrpLocalConfig));
mConnectionSuccessCallback = onConnection;
mConnectionFailureCallback = onFailure;
mConectionContext = context;
Expand All @@ -61,8 +58,6 @@ CHIP_ERROR CASEClient::EstablishSession(PeerId peer, const Transport::PeerAddres

void CASEClient::OnSessionEstablishmentError(CHIP_ERROR error)
{
mInitParams.idAllocator->Free(mCASESession.GetLocalSessionId());

if (mConnectionFailureCallback)
{
mConnectionFailureCallback(mConectionContext, this, error);
Expand Down
2 changes: 0 additions & 2 deletions src/app/CASEClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <messaging/ExchangeMgr.h>
#include <messaging/ReliableMessageProtocolConfig.h>
#include <protocols/secure_channel/CASESession.h>
#include <protocols/secure_channel/SessionIDAllocator.h>

namespace chip {

Expand All @@ -34,7 +33,6 @@ struct CASEClientInitParams
{
SessionManager * sessionManager = nullptr;
Messaging::ExchangeManager * exchangeMgr = nullptr;
SessionIDAllocator * idAllocator = nullptr;
FabricInfo * fabricInfo = nullptr;
Credentials::GroupDataProvider * groupDataProvider = nullptr;

Expand Down
6 changes: 3 additions & 3 deletions src/app/OperationalDeviceProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ bool OperationalDeviceProxy::GetAddress(Inet::IPAddress & addr, uint16_t & port)

CHIP_ERROR OperationalDeviceProxy::EstablishConnection()
{
mCASEClient = mInitParams.clientPool->Allocate(
CASEClientInitParams{ mInitParams.sessionManager, mInitParams.exchangeMgr, mInitParams.idAllocator, mFabricInfo,
mInitParams.groupDataProvider, mInitParams.mrpLocalConfig });
mCASEClient =
mInitParams.clientPool->Allocate(CASEClientInitParams{ mInitParams.sessionManager, mInitParams.exchangeMgr, mFabricInfo,
mInitParams.groupDataProvider, mInitParams.mrpLocalConfig });
ReturnErrorCodeIf(mCASEClient == nullptr, CHIP_ERROR_NO_MEMORY);
CHIP_ERROR err =
mCASEClient->EstablishSession(mPeerId, mDeviceAddress, mMRPConfig, HandleCASEConnected, HandleCASEConnectionFailure, this);
Expand Down
3 changes: 0 additions & 3 deletions src/app/OperationalDeviceProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <messaging/ExchangeMgr.h>
#include <messaging/Flags.h>
#include <protocols/secure_channel/CASESession.h>
#include <protocols/secure_channel/SessionIDAllocator.h>
#include <system/SystemLayer.h>
#include <transport/SessionManager.h>
#include <transport/TransportMgr.h>
Expand All @@ -51,7 +50,6 @@ struct DeviceProxyInitParams
{
SessionManager * sessionManager = nullptr;
Messaging::ExchangeManager * exchangeMgr = nullptr;
SessionIDAllocator * idAllocator = nullptr;
FabricTable * fabricTable = nullptr;
CASEClientPoolDelegate * clientPool = nullptr;
Credentials::GroupDataProvider * groupDataProvider = nullptr;
Expand All @@ -62,7 +60,6 @@ struct DeviceProxyInitParams
{
ReturnErrorCodeIf(sessionManager == nullptr, CHIP_ERROR_INCORRECT_STATE);
ReturnErrorCodeIf(exchangeMgr == nullptr, CHIP_ERROR_INCORRECT_STATE);
ReturnErrorCodeIf(idAllocator == nullptr, CHIP_ERROR_INCORRECT_STATE);
ReturnErrorCodeIf(fabricTable == nullptr, CHIP_ERROR_INCORRECT_STATE);
ReturnErrorCodeIf(groupDataProvider == nullptr, CHIP_ERROR_INCORRECT_STATE);
ReturnErrorCodeIf(clientPool == nullptr, CHIP_ERROR_INCORRECT_STATE);
Expand Down
14 changes: 6 additions & 8 deletions src/app/server/CommissioningWindowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE()
{
VerifyOrReturnError(mCommissioningTimeoutTimerArmed, CHIP_ERROR_INCORRECT_STATE);

uint16_t keyID = 0;
ReturnErrorOnFailure(mIDAllocator->Allocate(keyID));

mPairingSession.Clear();

ReturnErrorOnFailure(mServer->GetExchangeManager().RegisterUnsolicitedMessageHandlerForType(
Expand All @@ -188,9 +185,9 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE()
if (mUseECM)
{
ReturnErrorOnFailure(SetTemporaryDiscriminator(mECMDiscriminator));
ReturnErrorOnFailure(
mPairingSession.WaitForPairing(mECMPASEVerifier, mECMIterations, ByteSpan(mECMSalt, mECMSaltLength), keyID,
Optional<ReliableMessageProtocolConfig>::Value(GetLocalMRPConfig()), this));
ReturnErrorOnFailure(mPairingSession.WaitForPairing(
mServer->GetSecureSessionManager(), mECMPASEVerifier, mECMIterations, ByteSpan(mECMSalt, mECMSaltLength),
Optional<ReliableMessageProtocolConfig>::Value(GetLocalMRPConfig()), this));
}
else
{
Expand All @@ -211,8 +208,9 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE()

ReturnErrorOnFailure(verifier.Deserialize(ByteSpan(serializedVerifier)));

ReturnErrorOnFailure(mPairingSession.WaitForPairing(
verifier, iterationCount, saltSpan, keyID, Optional<ReliableMessageProtocolConfig>::Value(GetLocalMRPConfig()), this));
ReturnErrorOnFailure(mPairingSession.WaitForPairing(mServer->GetSecureSessionManager(), verifier, iterationCount, saltSpan,
Optional<ReliableMessageProtocolConfig>::Value(GetLocalMRPConfig()),
this));
}

ReturnErrorOnFailure(StartAdvertisement());
Expand Down
4 changes: 0 additions & 4 deletions src/app/server/CommissioningWindowManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <lib/dnssd/Advertiser.h>
#include <platform/CHIPDeviceConfig.h>
#include <protocols/secure_channel/RendezvousParameters.h>
#include <protocols/secure_channel/SessionIDAllocator.h>
#include <system/SystemClock.h>

namespace chip {
Expand Down Expand Up @@ -65,8 +64,6 @@ class CommissioningWindowManager : public SessionEstablishmentDelegate, public a

void SetAppDelegate(AppDelegate * delegate) { mAppDelegate = delegate; }

void SetSessionIDAllocator(SessionIDAllocator * idAllocator) { mIDAllocator = idAllocator; }

/**
* Open the pairing window using default configured parameters.
*/
Expand Down Expand Up @@ -146,7 +143,6 @@ class CommissioningWindowManager : public SessionEstablishmentDelegate, public a

bool mIsBLE = true;

SessionIDAllocator * mIDAllocator = nullptr;
PASESession mPairingSession;

uint8_t mFailedCommissioningAttempts = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/app/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint

SuccessOrExit(err = mCommissioningWindowManager.Init(this));
mCommissioningWindowManager.SetAppDelegate(delegate);
mCommissioningWindowManager.SetSessionIDAllocator(&mSessionIDAllocator);

// Set up attribute persistence before we try to bring up the data model
// handler.
Expand Down Expand Up @@ -241,7 +240,6 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint
.sessionInitParams = {
.sessionManager = &mSessions,
.exchangeMgr = &mExchangeMgr,
.idAllocator = &mSessionIDAllocator,
.fabricTable = &mFabrics,
.clientPool = &mCASEClientPool,
.groupDataProvider = &mGroupsProvider,
Expand Down
4 changes: 0 additions & 4 deletions src/app/server/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ class Server

Messaging::ExchangeManager & GetExchangeManager() { return mExchangeMgr; }

SessionIDAllocator & GetSessionIDAllocator() { return mSessionIDAllocator; }

SessionManager & GetSecureSessionManager() { return mSessions; }

TransportMgrBase & GetTransportManager() { return mTransports; }
Expand Down Expand Up @@ -248,12 +246,10 @@ class Server

Messaging::ExchangeManager mExchangeMgr;
FabricTable mFabrics;
SessionIDAllocator mSessionIDAllocator;
secure_channel::MessageCounterManager mMessageCounterManager;
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
chip::Protocols::UserDirectedCommissioning::UserDirectedCommissioningClient gUDCClient;
#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
SecurePairingUsingTestSecret mTestPairing;
CommissioningWindowManager mCommissioningWindowManager;

// Both PersistentStorageDelegate, and GroupDataProvider should be injected by the applications
Expand Down
3 changes: 0 additions & 3 deletions src/app/tests/TestOperationalDeviceProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <lib/support/UnitTestRegistration.h>
#include <nlunit-test.h>
#include <protocols/secure_channel/MessageCounterManager.h>
#include <protocols/secure_channel/SessionIDAllocator.h>
#include <system/SystemLayerImpl.h>
#include <transport/SessionManager.h>
#include <transport/TransportMgr.h>
Expand Down Expand Up @@ -56,7 +55,6 @@ void TestOperationalDeviceProxy_EstablishSessionDirectly(nlTestSuite * inSuite,
VerifyOrDie(fabric != nullptr);
secure_channel::MessageCounterManager messageCounterManager;
chip::TestPersistentStorageDelegate deviceStorage;
SessionIDAllocator idAllocator;
GroupDataProviderImpl groupDataProvider;

systemLayer.Init();
Expand All @@ -72,7 +70,6 @@ void TestOperationalDeviceProxy_EstablishSessionDirectly(nlTestSuite * inSuite,
DeviceProxyInitParams params = {
.sessionManager = &sessionManager,
.exchangeMgr = &exchangeMgr,
.idAllocator = &idAllocator,
.fabricInfo = fabric,
.groupDataProvider = &groupDataProvider,
};
Expand Down
1 change: 1 addition & 0 deletions src/app/tests/integration/chip_im_initiator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ CHIP_ERROR EstablishSecureSession()

chip::SecurePairingUsingTestSecret * testSecurePairingSecret = chip::Platform::New<chip::SecurePairingUsingTestSecret>();
VerifyOrExit(testSecurePairingSecret != nullptr, err = CHIP_ERROR_NO_MEMORY);
testSecurePairingSecret->Init(gSessionManager);

// Attempt to connect to the peer.
err = gSessionManager.NewPairing(gSession,
Expand Down
1 change: 1 addition & 0 deletions src/app/tests/integration/chip_im_responder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ int main(int argc, char * argv[])

InitializeEventLogging(&gExchangeManager);

gTestPairing.Init(gSessionManager);
err = gSessionManager.NewPairing(gSession, peer, chip::kTestControllerNodeId, &gTestPairing,
chip::CryptoContext::SessionRole::kResponder, gFabricIndex);
SuccessOrExit(err);
Expand Down
9 changes: 2 additions & 7 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ ControllerDeviceInitParams DeviceController::GetControllerDeviceInitParams()
.exchangeMgr = mSystemState->ExchangeMgr(),
.udpEndPointManager = mSystemState->UDPEndPointManager(),
.storageDelegate = mStorageDelegate,
.idAllocator = mSystemState->SessionIDAlloc(),
.fabricsTable = mSystemState->Fabrics(),
};
}
Expand Down Expand Up @@ -610,8 +609,7 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re

Messaging::ExchangeContext * exchangeCtxt = nullptr;
Optional<SessionHandle> session;

uint16_t keyID = 0;
SessionHolder secureSessionHolder;

VerifyOrExit(mState == State::Initialized, err = CHIP_ERROR_INCORRECT_STATE);
VerifyOrExit(mDeviceInPASEEstablishment == nullptr, err = CHIP_ERROR_INCORRECT_STATE);
Expand Down Expand Up @@ -677,9 +675,6 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re
session = mSystemState->SessionMgr()->CreateUnauthenticatedSession(params.GetPeerAddress(), device->GetMRPConfig());
VerifyOrExit(session.HasValue(), err = CHIP_ERROR_NO_MEMORY);

err = mSystemState->SessionIDAlloc()->Allocate(keyID);
SuccessOrExit(err);

// TODO - Remove use of SetActive/IsActive from CommissioneeDeviceProxy
device->SetActive(true);

Expand All @@ -692,7 +687,7 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re
exchangeCtxt = mSystemState->ExchangeMgr()->NewContext(session.Value(), &device->GetPairing());
VerifyOrExit(exchangeCtxt != nullptr, err = CHIP_ERROR_INTERNAL);

err = device->GetPairing().Pair(params.GetPeerAddress(), params.GetSetupPINCode(), keyID,
err = device->GetPairing().Pair(*mSystemState->SessionMgr(), params.GetPeerAddress(), params.GetSetupPINCode(),
Optional<ReliableMessageProtocolConfig>::Value(GetLocalMRPConfig()), exchangeCtxt, this);
SuccessOrExit(err);

Expand Down
9 changes: 1 addition & 8 deletions src/controller/CHIPDeviceControllerFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,12 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params)
chip::app::DnssdServer::Instance().StartServer();
}

stateParams.sessionIDAllocator = Platform::New<SessionIDAllocator>();
stateParams.operationalDevicePool = Platform::New<DeviceControllerSystemStateParams::OperationalDevicePool>();
stateParams.caseClientPool = Platform::New<DeviceControllerSystemStateParams::CASEClientPool>();

DeviceProxyInitParams deviceInitParams = {
.sessionManager = stateParams.sessionMgr,
.exchangeMgr = stateParams.exchangeMgr,
.idAllocator = stateParams.sessionIDAllocator,
.fabricTable = stateParams.fabricTable,
.clientPool = stateParams.caseClientPool,
.groupDataProvider = stateParams.groupDataProvider,
Expand Down Expand Up @@ -336,13 +334,8 @@ CHIP_ERROR DeviceControllerSystemState::Shutdown()
mCASESessionManager = nullptr;
}

// mSessionIDAllocator, mCASEClientPool, and mDevicePool must be deallocated
// mCASEClientPool and mDevicePool must be deallocated
// after mCASESessionManager, which uses them.
if (mSessionIDAllocator != nullptr)
{
Platform::Delete(mSessionIDAllocator);
mSessionIDAllocator = nullptr;
}

if (mOperationalDevicePool != nullptr)
{
Expand Down
11 changes: 3 additions & 8 deletions src/controller/CHIPDeviceControllerSystemState.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <lib/core/CHIPConfig.h>
#include <protocols/secure_channel/CASEServer.h>
#include <protocols/secure_channel/MessageCounterManager.h>
#include <protocols/secure_channel/SessionIDAllocator.h>

#include <transport/TransportMgr.h>
#include <transport/raw/UDP.h>
Expand Down Expand Up @@ -88,7 +87,6 @@ struct DeviceControllerSystemStateParams
FabricTable * fabricTable = nullptr;
CASEServer * caseServer = nullptr;
CASESessionManager * caseSessionManager = nullptr;
SessionIDAllocator * sessionIDAllocator = nullptr;
OperationalDevicePool * operationalDevicePool = nullptr;
CASEClientPool * caseClientPool = nullptr;
Credentials::GroupDataProvider * groupDataProvider = nullptr;
Expand All @@ -109,8 +107,8 @@ class DeviceControllerSystemState
mUDPEndPointManager(params.udpEndPointManager), mTransportMgr(params.transportMgr), mSessionMgr(params.sessionMgr),
mExchangeMgr(params.exchangeMgr), mMessageCounterManager(params.messageCounterManager), mFabrics(params.fabricTable),
mCASEServer(params.caseServer), mCASESessionManager(params.caseSessionManager),
mSessionIDAllocator(params.sessionIDAllocator), mOperationalDevicePool(params.operationalDevicePool),
mCASEClientPool(params.caseClientPool), mGroupDataProvider(params.groupDataProvider)
mOperationalDevicePool(params.operationalDevicePool), mCASEClientPool(params.caseClientPool),
mGroupDataProvider(params.groupDataProvider)
{
#if CONFIG_NETWORK_LAYER_BLE
mBleLayer = params.bleLayer;
Expand Down Expand Up @@ -143,8 +141,7 @@ class DeviceControllerSystemState
{
return mSystemLayer != nullptr && mUDPEndPointManager != nullptr && mTransportMgr != nullptr && mSessionMgr != nullptr &&
mExchangeMgr != nullptr && mMessageCounterManager != nullptr && mFabrics != nullptr && mCASESessionManager != nullptr &&
mSessionIDAllocator != nullptr && mOperationalDevicePool != nullptr && mCASEClientPool != nullptr &&
mGroupDataProvider != nullptr;
mOperationalDevicePool != nullptr && mCASEClientPool != nullptr && mGroupDataProvider != nullptr;
};

System::Layer * SystemLayer() const { return mSystemLayer; };
Expand All @@ -159,7 +156,6 @@ class DeviceControllerSystemState
Ble::BleLayer * BleLayer() const { return mBleLayer; };
#endif
CASESessionManager * CASESessionMgr() const { return mCASESessionManager; }
SessionIDAllocator * SessionIDAlloc() const { return mSessionIDAllocator; }
Credentials::GroupDataProvider * GetGroupDataProvider() const { return mGroupDataProvider; }

private:
Expand All @@ -178,7 +174,6 @@ class DeviceControllerSystemState
FabricTable * mFabrics = nullptr;
CASEServer * mCASEServer = nullptr;
CASESessionManager * mCASESessionManager = nullptr;
SessionIDAllocator * mSessionIDAllocator = nullptr;
OperationalDevicePool * mOperationalDevicePool = nullptr;
CASEClientPool * mCASEClientPool = nullptr;
Credentials::GroupDataProvider * mGroupDataProvider = nullptr;
Expand Down
5 changes: 0 additions & 5 deletions src/controller/CommissioneeDeviceProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <messaging/ExchangeMgr.h>
#include <messaging/Flags.h>
#include <protocols/secure_channel/PASESession.h>
#include <protocols/secure_channel/SessionIDAllocator.h>
#include <transport/SessionHolder.h>
#include <transport/SessionManager.h>
#include <transport/TransportMgr.h>
Expand Down Expand Up @@ -69,7 +68,6 @@ struct ControllerDeviceInitParams
Messaging::ExchangeManager * exchangeMgr = nullptr;
Inet::EndPointManager<Inet::UDPEndPoint> * udpEndPointManager = nullptr;
PersistentStorageDelegate * storageDelegate = nullptr;
SessionIDAllocator * idAllocator = nullptr;
#if CONFIG_NETWORK_LAYER_BLE
Ble::BleLayer * bleLayer = nullptr;
#endif
Expand Down Expand Up @@ -120,7 +118,6 @@ class CommissioneeDeviceProxy : public DeviceProxy, public SessionReleaseDelegat
mExchangeMgr = params.exchangeMgr;
mUDPEndPointManager = params.udpEndPointManager;
mFabricIndex = fabric;
mIDAllocator = params.idAllocator;
#if CONFIG_NETWORK_LAYER_BLE
mBleLayer = params.bleLayer;
#endif
Expand Down Expand Up @@ -287,8 +284,6 @@ class CommissioneeDeviceProxy : public DeviceProxy, public SessionReleaseDelegat
CHIP_ERROR LoadSecureSessionParametersIfNeeded(bool & didLoad);

FabricIndex mFabricIndex = kUndefinedFabricIndex;

SessionIDAllocator * mIDAllocator = nullptr;
};

} // namespace chip
Loading

0 comments on commit 9614241

Please sign in to comment.