* [PATCH] Bluetooth: hci_sync: Unfiltered scan for peers outside resolving list
@ 2026-11-27 5:45 Weihong Guan
2026-11-27 13:53 ` bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Weihong Guan @ 2026-11-27 5:45 UTC (permalink / raw)
To: linux-bluetooth
Cc: Kyle Pepper, Weihong Guan, Marcel Holtmann,
Luiz Augusto von Dentz
A bonded peer using a resolvable private address is connected to by its
identity address only if its conn params carry
HCI_CONN_FLAG_ADDRESS_RESOLUTION. Without the flag,
hci_le_add_resolve_list_sync() leaves the peer's IRK out of the
controller's resolving list, but hci_le_add_accept_list_sync() still adds
its identity to the accept list, and the passive scan runs with filter
policy 0x01 and address resolution enabled. The controller has no IRK to
resolve the peer's RPA with, its advertising matches nothing, and the
connection never completes, though the kernel holds the IRK.
A plain connect makes such params: hci_explicit_conn_params_set() adds
them with no flags, so l2test, or bluetoothd's Device1.Connect for a
device it hasn't added to the kernel itself, waits forever.
Scan unfiltered for these peers too, as commit 397464709a20 ("Bluetooth:
hci_sync: scan unfiltered for host-resolved RPAs") does for a controller
without LL privacy: the host resolves the advertising and connects to the
RPA it found. The flag keeps its meaning, userspace's choice to have the
controller resolve.
Fixes: e209e5ccc5ac ("Bluetooth: MGMT: Mark LL Privacy as stable")
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Weihong Guan <weihong.guan@gmail.com>
---
How it was found and tested: first seen on Linux 6.18 with a BL602 as the
peer, then reproduced on a Raspberry Pi 5 running 7.4-rc2 with
net/bluetooth from bluetooth-next, bluetoothd stopped (an empty MGMT Load
IRKs first, as bluetoothd does, so pairing asks for the peer's IRK).
Controllers: as the central, an nRF52840 dongle with Zephyr's hci_usb (LL
privacy, resolving list 8), and a WCH CH583 running our open HCI
controller firmware over USB (LL privacy, resolving list 8). As the
private peer, a CH583 or a CH571 running the same firmware's BLE 4.0
build (no address resolution, so its Linux makes the RPA in the host).
Steps: pair the central with the peer at its RPA (btmgmt pair, Just
Works); the peer moves to a new RPA; then
l2test -n -i hciX -J 4 -V le_public -E <identity>
Without this patch (nRF52840 central here, and the BL602 bench's runs on
6.18): not connected in 15 s, resolv_list empty, the IRK in
identity_resolving_keys (the kernel saw the new RPA). With it: connected,
3 of 3 (nRF52840 central once, CH583 central twice), resolv_list still
empty: the host resolved the advertising. With the flag set (btmgmt
add-device -a 0, set-flags -f 4), the resolving list path, unchanged:
connected through the resolving list on the nRF52840.
Related, not overlapping: Radek Podgorny's "Bluetooth: find an RPA peer's
connection parameters by its identity" (v5) changes the connect path, on
a controller without LL privacy; Brandon Williams' "Bluetooth: hci_sync:
Reprogram the resolving list when a peer's IRK changes" handles a stale
entry, not a peer left out of the list.
net/bluetooth/hci_sync.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index ee426ffea..7ca7676ae 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -2893,8 +2893,13 @@ static int hci_le_add_accept_list_sync(struct hci_dev *hdev,
return 0;
}
- /* Host-resolved peers need unfiltered scanning while awake. */
- if (!force_filter && !hdev->suspended && !ll_privacy_capable(hdev) &&
+ /* Host-resolved peers need unfiltered scanning while awake: with no LL
+ * privacy, or not marked for address resolution, which keeps them out
+ * of the resolving list (hci_le_add_resolve_list_sync()).
+ */
+ if (!force_filter && !hdev->suspended &&
+ (!ll_privacy_capable(hdev) ||
+ !(params->flags & HCI_CONN_FLAG_ADDRESS_RESOLUTION)) &&
hci_find_irk_by_addr(hdev, ¶ms->addr, params->addr_type))
return -EINVAL;
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: Bluetooth: hci_sync: Unfiltered scan for peers outside resolving list
2026-11-27 5:45 [PATCH] Bluetooth: hci_sync: Unfiltered scan for peers outside resolving list Weihong Guan
@ 2026-11-27 13:53 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-27 13:53 UTC (permalink / raw)
To: linux-bluetooth, weihong.guan
[-- Attachment #1: Type: text/plain, Size: 2964 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1223969/
---Test result---
Test Summary:
CheckPatch FAIL 0.52 seconds
VerifyFixes PASS 0.09 seconds
VerifySignedoff PASS 0.09 seconds
GitLint PASS 0.24 seconds
SubjectPrefix PASS 0.09 seconds
BuildKernel PASS 18.06 seconds
CheckAllWarning PASS 20.93 seconds
CheckSparse PASS 22.39 seconds
BuildKernel32 PASS 18.21 seconds
CheckKernelLLVM PASS 18.45 seconds
TestRunnerSetup PASS 413.90 seconds
TestRunner_l2cap-tester PASS 14.45 seconds
TestRunner_iso-tester PASS 10.33 seconds
TestRunner_bnep-tester PASS 2.83 seconds
TestRunner_mgmt-tester FAIL 86.29 seconds
TestRunner_rfcomm-tester PASS 3.99 seconds
TestRunner_sco-tester PASS 4.95 seconds
TestRunner_ioctl-tester PASS 4.02 seconds
TestRunner_mesh-tester PASS 3.94 seconds
TestRunner_smp-tester PASS 3.87 seconds
TestRunner_userchan-tester PASS 2.79 seconds
TestRunner_6lowpan-tester PASS 3.93 seconds
IncrementalBuild PASS 17.20 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
Bluetooth: hci_sync: Unfiltered scan for peers outside resolving list
WARNING: Non-standard signature: Assisted-by:
#139:
Assisted-by: Claude:claude-opus-5.5
ERROR: Unrecognized email address: 'Claude:claude-opus-5.5'
#139:
Assisted-by: Claude:claude-opus-5.5
total: 1 errors, 1 warnings, 0 checks, 15 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15028060.patch has style problems, please review.
NOTE: Ignored message types: UNKNOWN_COMMIT_ID
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 529, Passed: 525 (99.2%), Failed: 4, Not Run: 0
Failed Test Cases
LL Privacy - Scan RPA - Auto-connect with IRK Failed 0.016 seconds
LL Privacy - Scan RPA - Background report with IRK Failed 0.016 seconds
LL Privacy - Add Device 2 (2 Devices to AL) Timed out 2.006 seconds
LL Privacy - Add Device 3 (AL is full) Timed out 2.008 seconds
https://github.com/bluez/bluetooth-next/pull/1238
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-27 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 5:45 [PATCH] Bluetooth: hci_sync: Unfiltered scan for peers outside resolving list Weihong Guan
2026-11-27 13:53 ` bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox