Message ID | 20240827081333.55914-1-xiaokeqinhealth@126.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/1] Bluetooth: mgmt: Fix LTK load error in SMP over BREDR scenario | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/SubjectPrefix | success | Gitlint PASS |
tedd_an/BuildKernel | success | BuildKernel PASS |
tedd_an/CheckAllWarning | success | CheckAllWarning PASS |
tedd_an/CheckSparse | success | CheckSparse PASS |
Hi Felix, On Tue, Aug 27, 2024 at 4:14 AM Felix Qin <xiaokeqinhealth@126.com> wrote: > > From: Felix Qin <xiaoyao@rock-chips.com> > > Fixes: 59b047bc9808 ("Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE") > Signed-off-by: Felix Qin <xiaoyao@rock-chips.com> > --- > net/bluetooth/mgmt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c > index 25979f4283a6..13bba6ad5d95 100644 > --- a/net/bluetooth/mgmt.c > +++ b/net/bluetooth/mgmt.c > @@ -7106,6 +7106,9 @@ static bool ltk_is_valid(struct mgmt_ltk_info *key) > return false; > > switch (key->addr.type) { > + case BDADDR_BREDR: > + /* ltk over bredr */ > + return true; > case BDADDR_LE_PUBLIC: > return true; > > -- > 2.34.1 I thought about doing that but this is not correct according to our own documentation: https://github.com/bluez/bluez/blob/master/doc/mgmt-api.txt#L877 There is also the question of why we would need to load BR/EDR addresses via Load LTK when that is LE bearer specific. >
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 25979f4283a6..13bba6ad5d95 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -7106,6 +7106,9 @@ static bool ltk_is_valid(struct mgmt_ltk_info *key) return false; switch (key->addr.type) { + case BDADDR_BREDR: + /* ltk over bredr */ + return true; case BDADDR_LE_PUBLIC: return true;