From 10648288384a67d33301bc01a56b9244f8a6ccef Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Tue, 27 Apr 2021 14:51:38 -0700 Subject: [PATCH] Disable CRMP when PASE uses BLE (#6317) --- src/protocols/secure_channel/RendezvousSession.h | 1 - .../secure_channel/SessionEstablishmentExchangeDispatch.cpp | 4 +--- .../secure_channel/SessionEstablishmentExchangeDispatch.h | 5 ++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/protocols/secure_channel/RendezvousSession.h b/src/protocols/secure_channel/RendezvousSession.h index 0204c6f3a33158..3598ef55c819a1 100644 --- a/src/protocols/secure_channel/RendezvousSession.h +++ b/src/protocols/secure_channel/RendezvousSession.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp index 48ce10a777cdb7..3eb32b6505af14 100644 --- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp +++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.cpp @@ -45,10 +45,8 @@ CHIP_ERROR SessionEstablishmentExchangeDispatch::OnMessageReceived(const Payload const Transport::PeerAddress & peerAddress, ReliableMessageContext * reliableMessageContext) { - ReturnErrorOnFailure(ExchangeMessageDispatch::OnMessageReceived(payloadHeader, messageId, peerAddress, reliableMessageContext)); mPeerAddress = peerAddress; - - return CHIP_NO_ERROR; + return ExchangeMessageDispatch::OnMessageReceived(payloadHeader, messageId, peerAddress, reliableMessageContext); } bool SessionEstablishmentExchangeDispatch::MessagePermitted(uint16_t protocol, uint8_t type) diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h index d2bc0a870affed..3d78091ab3a335 100644 --- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h +++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h @@ -59,9 +59,8 @@ class SessionEstablishmentExchangeDispatch : public Messaging::ExchangeMessageDi bool IsTransportReliable() override { - // If we are not using BLE as the transport, the underlying transport is UDP based. - // (return true only if BLE is being used as the transport) - return (mTransportMgr == nullptr); + // If the underlying transport is not UDP. + return (mPeerAddress.GetTransportType() != Transport::Type::kUdp); } private: