Skip to content

Commit 386816b

Browse files
Enable MRP in WiFi-PAF commissioning (project-chip#35500)
* Enable MRP in WiFi-PAF commissioning Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com> * Restyled by clang-format --------- Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 45a68f8 commit 386816b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/transport/SecureSession.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ class SecureSession : public Session, public ReferenceCounted<SecureSession, Sec
158158

159159
bool IsCommissioningSession() const override;
160160

161-
bool AllowsMRP() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kUdp; }
161+
bool AllowsMRP() const override
162+
{
163+
return ((GetPeerAddress().GetTransportType() == Transport::Type::kUdp) ||
164+
(GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF));
165+
}
162166

163167
bool AllowsLargePayload() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kTcp; }
164168

src/transport/UnauthenticatedSessionTable.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ class UnauthenticatedSession : public Session, public ReferenceCounted<Unauthent
8484
return Access::SubjectDescriptor(); // return an empty ISD for unauthenticated session.
8585
}
8686

87-
bool AllowsMRP() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kUdp; }
87+
bool AllowsMRP() const override
88+
{
89+
return ((GetPeerAddress().GetTransportType() == Transport::Type::kUdp) ||
90+
(GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF));
91+
}
8892

8993
bool AllowsLargePayload() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kTcp; }
9094

0 commit comments

Comments
 (0)