From 23a87bad66e0d189f3a6b0c357ab035a547e509b Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 17 Sep 2024 13:52:14 +0200 Subject: [PATCH] [MRP] Log the local MRP values used when establishing a PASE or a CASE session --- src/protocols/secure_channel/CASESession.cpp | 6 +++++- src/protocols/secure_channel/PASESession.cpp | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 96cd7e17eef449..99d663a3bb44da 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -872,7 +872,11 @@ CHIP_ERROR CASESession::SendSigma1() mState = State::kSentSigma1; } - ChipLogProgress(SecureChannel, "Sent Sigma1 msg to " ChipLogFormatScopedNodeId, ChipLogValueScopedNodeId(GetPeer())); + const auto localMRPConfig = mLocalMRPConfig.Value(); + ChipLogProgress(SecureChannel, + "Sent Sigma1 msg to " ChipLogFormatScopedNodeId " [II:%" PRIu32 "ms AI:%" PRIu32 "ms AT:%" PRIu16 "ms]", + ChipLogValueScopedNodeId(GetPeer()), localMRPConfig.mIdleRetransTimeout.count(), + localMRPConfig.mActiveRetransTimeout.count(), localMRPConfig.mActiveThresholdTime.count()); mDelegate->OnSessionEstablishmentStarted(); diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index 1702a159bb111c..069773f7ed61dc 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -314,7 +314,10 @@ CHIP_ERROR PASESession::SendPBKDFParamRequest() mNextExpectedMsg.SetValue(MsgType::PBKDFParamResponse); - ChipLogDetail(SecureChannel, "Sent PBKDF param request"); + const auto localMRPConfig = mLocalMRPConfig.Value(); + ChipLogProgress(SecureChannel, "Sent PBKDF param request [II:%" PRIu32 "ms AI:%" PRIu32 "ms AT:%" PRIu16 "ms)", + localMRPConfig.mIdleRetransTimeout.count(), localMRPConfig.mActiveRetransTimeout.count(), + localMRPConfig.mActiveThresholdTime.count()); return CHIP_NO_ERROR; }