diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index a0ad834b033027..252d8ad02959d6 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -166,7 +166,6 @@ CHIP_ERROR SessionManager::PrepareMessage(const SessionHandle & sessionHandle, P packetHeader.SetDestinationGroupId(groupSession->GetGroupId()); packetHeader.SetMessageCounter(mGroupClientCounter.GetCounter(isControlMsg)); mGroupClientCounter.IncrementCounter(isControlMsg); - packetHeader.SetFlags(Header::SecFlagValues::kPrivacyFlag); packetHeader.SetSessionType(Header::SessionType::kGroupSession); NodeId sourceNodeId = fabric->GetNodeId(); packetHeader.SetSourceNodeId(sourceNodeId); diff --git a/src/transport/raw/MessageHeader.h b/src/transport/raw/MessageHeader.h index c1ccf540b2f55a..5589647bd9ebc9 100644 --- a/src/transport/raw/MessageHeader.h +++ b/src/transport/raw/MessageHeader.h @@ -203,14 +203,14 @@ class PacketHeader { // Check is based on spec 4.11.2 return (IsGroupSession() && GetSourceNodeId().HasValue() && GetDestinationGroupId().HasValue() && - !IsSecureSessionControlMsg() && HasPrivacyFlag()); + !IsSecureSessionControlMsg()); } bool IsValidMCSPMsg() const { // Check is based on spec 4.9.2.4 return (IsGroupSession() && GetSourceNodeId().HasValue() && GetDestinationNodeId().HasValue() && - IsSecureSessionControlMsg() && HasPrivacyFlag()); + IsSecureSessionControlMsg()); } bool IsEncrypted() const { return !((mSessionId == kMsgUnicastSessionIdUnsecured) && IsUnicastSession()); } diff --git a/src/transport/raw/tests/TestMessageHeader.cpp b/src/transport/raw/tests/TestMessageHeader.cpp index ff50e104f7579f..1ad9b7b1e03d64 100644 --- a/src/transport/raw/tests/TestMessageHeader.cpp +++ b/src/transport/raw/tests/TestMessageHeader.cpp @@ -151,7 +151,6 @@ void TestPacketHeaderEncodeDecode(nlTestSuite * inSuite, void * inContext) header.ClearDestinationNodeId(); header.SetSessionType(Header::SessionType::kGroupSession); - header.SetFlags(Header::SecFlagValues::kPrivacyFlag); header.SetSecureSessionControlMsg(false); NL_TEST_ASSERT(inSuite, header.Encode(buffer, &encodeLen) == CHIP_NO_ERROR); @@ -165,7 +164,7 @@ void TestPacketHeaderEncodeDecode(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, header.IsValidGroupMsg()); // Verify MCSP state - header.ClearDestinationGroupId().SetDestinationNodeId(42).SetFlags(Header::SecFlagValues::kPrivacyFlag); + header.ClearDestinationGroupId().SetDestinationNodeId(42); header.SetSecureSessionControlMsg(true); NL_TEST_ASSERT(inSuite, header.Encode(buffer, &encodeLen) == CHIP_NO_ERROR); @@ -174,7 +173,6 @@ void TestPacketHeaderEncodeDecode(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, header.Decode(buffer, &decodeLen) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, header.GetDestinationNodeId() == Optional::Value(42ull)); NL_TEST_ASSERT(inSuite, !header.GetDestinationGroupId().HasValue()); - NL_TEST_ASSERT(inSuite, header.HasPrivacyFlag()); NL_TEST_ASSERT(inSuite, header.IsValidMCSPMsg()); }