Re: [bluetooth-next v3 07/16] Bluetooth: Add SMP confirmation checks methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vinicius/Anderson,

On Tue, Jun 07, 2011, Vinicius Costa Gomes wrote:
> +	ret = smp_c1(tfm, conn->tk, conn->prnd, conn->preq, conn->prsp, 0,
> +			conn->src, 0, conn->dst, res);

The third last parameter is the remote address type and you're
hard-coding it to 0 (public) here. This means that we cannot pair with a
device with a random address. I suppose you should be passing
conn->hcon->dst_type instead.

> +		ret = smp_c1(tfm, conn->tk, conn->prnd, conn->preq, conn->prsp,
> +					0, conn->dst, 0, conn->src, res);

Same here.

> +	if (conn->hcon->out)
> +		ret = smp_c1(tfm, conn->tk, random, conn->preq, conn->prsp, 0,
> +				conn->src, 0, conn->dst, res);
> +	else
> +		ret = smp_c1(tfm, conn->tk, random, conn->preq, conn->prsp, 0,
> +				conn->dst, 0, conn->src, res);

And here.

You're also hard-coding the local address type to public, but that's a
less severe issue (for now).

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux