Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73669695 authored by Chris Manton's avatar Chris Manton
Browse files

smp: Log if remote lmp_version is invalid

Unread, missing or late remote version info will force
drop from secure into legacy security mode

Bug: 163134718
Tag: #refactor
Test: Paired 2 phones using LE/nRF

Change-Id: I1e52ac96354981b6abbfc1d46e4323becf25b388
parent feda1cfc
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -166,8 +166,13 @@ void smp_send_app_cback(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
            p_cb->loc_auth_req |= SMP_SC_SUPPORT_BIT;
          }

          BTM_ReadRemoteVersion(p_cb->pairing_bda, &remote_lmp_version, nullptr,
                                nullptr);
          if (!BTM_ReadRemoteVersion(p_cb->pairing_bda, &remote_lmp_version,
                                     nullptr, nullptr)) {
            LOG_WARN(
                "SMP Unable to determine remote security authentication "
                "remote_lmp_version:%hu",
                remote_lmp_version);
          }

          if (!p_cb->secure_connections_only_mode_required &&
              (!(p_cb->loc_auth_req & SMP_SC_SUPPORT_BIT) ||