Hi Vinicius, On Wed, Jun 8, 2011 at 11:26 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote: > 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. I notice that you guys have this fixed here: http://git.infradead.org/users/vcgomes/linux-2.6.git/commitdiff/f345aa37d6d49104ef4b2b7e4466fb3186807199 So I wonder why this was not fix in place? >> + 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 > -- Luiz Augusto von Dentz Computer Engineer -- 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