if (conn->out) {
memset(rsp, 0, sizeof(rsp));
- smp_send(conn, BT_L2CAP_SMP_PAIRING_RANDOM, rsp, sizeof(rsp));
+ smp_send(conn, BT_L2CAP_SMP_PAIRING_RANDOM, conn->prnd,
+ sizeof(conn->prnd));
} else {
bt_crypto_c1(conn->smp->crypto, conn->tk, conn->prnd,
conn->prsp, conn->preq, conn->ia_type,
static void pairing_rnd(struct smp_conn *conn, const void *data, uint16_t len)
{
- uint8_t rsp[16];
-
memcpy(conn->rrnd, data + 1, 16);
if (conn->sc) {
if (conn->out)
return;
- memset(rsp, 0, sizeof(rsp));
- smp_send(conn, BT_L2CAP_SMP_PAIRING_RANDOM, rsp, sizeof(rsp));
+ smp_send(conn, BT_L2CAP_SMP_PAIRING_RANDOM, conn->prnd,
+ sizeof(conn->prnd));
}
static void encrypt_info(struct smp_conn *conn, const void *data, uint16_t len)