diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index d1ba41153b66..1621c24aebf8 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -2737,7 +2737,7 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb) if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) && !crypto_memneq(key, smp->local_pk, 64)) { bt_dev_err(hdev, "Remote and local public keys are identical"); - return SMP_UNSPECIFIED; + return SMP_DHKEY_CHECK_FAILED; } memcpy(smp->remote_pk, key, 64);