Enable MRP in WiFi-PAF commissioning (#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>
diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h
index ba586a3..574d5f4 100644
--- a/src/transport/SecureSession.h
+++ b/src/transport/SecureSession.h
@@ -158,7 +158,11 @@
bool IsCommissioningSession() const override;
- bool AllowsMRP() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kUdp; }
+ bool AllowsMRP() const override
+ {
+ return ((GetPeerAddress().GetTransportType() == Transport::Type::kUdp) ||
+ (GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF));
+ }
bool AllowsLargePayload() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kTcp; }
diff --git a/src/transport/UnauthenticatedSessionTable.h b/src/transport/UnauthenticatedSessionTable.h
index d77bf70..707d401 100644
--- a/src/transport/UnauthenticatedSessionTable.h
+++ b/src/transport/UnauthenticatedSessionTable.h
@@ -84,7 +84,11 @@
return Access::SubjectDescriptor(); // return an empty ISD for unauthenticated session.
}
- bool AllowsMRP() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kUdp; }
+ bool AllowsMRP() const override
+ {
+ return ((GetPeerAddress().GetTransportType() == Transport::Type::kUdp) ||
+ (GetPeerAddress().GetTransportType() == Transport::Type::kWiFiPAF));
+ }
bool AllowsLargePayload() const override { return GetPeerAddress().GetTransportType() == Transport::Type::kTcp; }