GNOME Bugzilla – Bug 787440
Scanning for Bluetooth devices creates Broadband connections for unpaired devices
Last modified: 2017-09-18 17:00:24 UTC
Created attachment 359397 [details] broadband connections 1. Open gnome-control-center's Bluetooth panel 2. Wait a while with Bluetooth networking devices in the proximity 3. Open the Network panel and see the connections NM created The gnome-shell status menu showed "7 Broadband connections" in the menu as well. NM shouldn't be created connections for unpaired devices.
You can also do: bluetoothctl then type "scan on" And poll for new connections: watch -n 0.5 nmcli connection A connection for an unpaired device will show up promptly: Bbox Miami Network b793a04c-1f17-42ee-858e-b84eb075841a bluetooth --
That device in bluetoothctl: [NEW] Device 9C:80:DF:FD:35:CC Bbox Miami info 9C:80:DF:FD:35:CC Device 9C:80:DF:FD:35:CC Name: Bbox Miami Alias: Bbox Miami Class: 0x380424 Icon: audio-card Paired: no Trusted: no Blocked: no Connected: no LegacyPairing: no UUID: OBEX Object Push (00001105-0000-1000-8000-00805f9b34fb) UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) UUID: Headset AG (00001112-0000-1000-8000-00805f9b34fb) UUID: PANU (00001115-0000-1000-8000-00805f9b34fb) UUID: NAP (00001116-0000-1000-8000-00805f9b34fb) UUID: Handsfree Audio Gateway (0000111f-0000-1000-8000-00805f9b34fb) UUID: Phonebook Access Server (0000112f-0000-1000-8000-00805f9b34fb) UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) UUID: Message Access Server (00001132-0000-1000-8000-00805f9b34fb)
Do you see in NM logs any line containing: audit: op="connection-add" ... ?
(In reply to Beniamino Galvani from comment #3) > Do you see in NM logs any line containing: > > audit: op="connection-add" ... > > ? If that's what happens when new connections are created, then yes. The code never checks whether the devices it sees are Paired or not: https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/devices/bluetooth/nm-bluez-device.c?h=nm-1-6#n272 It should only ever create new connections for Paired devices.
Created attachment 359989 [details] [review] [PATCH] bluetooth: generate connections only for paired devices
(In reply to Beniamino Galvani from comment #5) > Created attachment 359989 [details] [review] [review] > [PATCH] bluetooth: generate connections only for paired devices lgtm
Review of attachment 359989 [details] [review]: ::: src/devices/bluetooth/nm-bluez-device.h @@ -63,3 @@ const char *nm_bluez_device_get_name (NMBluezDevice *self); -guint32 nm_bluez_device_get_class (NMBluezDevice *self); This looks unrelated, no?
(In reply to Bastien Nocera from comment #7) > Review of attachment 359989 [details] [review] [review]: > > ::: src/devices/bluetooth/nm-bluez-device.h > @@ -63,3 @@ > const char *nm_bluez_device_get_name (NMBluezDevice *self); > > -guint32 nm_bluez_device_get_class (NMBluezDevice *self); > > This looks unrelated, no? Yes, I've split the change to a separate patch. Applied to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=87e17d96df70735ef217eaa01958a5c9a640816c