After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787440 - Scanning for Bluetooth devices creates Broadband connections for unpaired devices
Scanning for Bluetooth devices creates Broadband connections for unpaired dev...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Mobile broadband
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-09-08 12:05 UTC by Bastien Nocera
Modified: 2017-09-18 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
broadband connections (33.60 KB, image/png)
2017-09-08 12:05 UTC, Bastien Nocera
  Details
[PATCH] bluetooth: generate connections only for paired devices (3.85 KB, patch)
2017-09-18 14:00 UTC, Beniamino Galvani
none Details | Review

Description Bastien Nocera 2017-09-08 12:05:45 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.
Comment 1 Bastien Nocera 2017-09-08 12:12:51 UTC
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        --
Comment 2 Bastien Nocera 2017-09-08 12:14:57 UTC
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)
Comment 3 Beniamino Galvani 2017-09-08 15:57:38 UTC
Do you see in NM logs any line containing:

 audit: op="connection-add" ...

?
Comment 4 Bastien Nocera 2017-09-14 11:53:57 UTC
(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.
Comment 5 Beniamino Galvani 2017-09-18 14:00:40 UTC
Created attachment 359989 [details] [review]
[PATCH] bluetooth: generate connections only for paired devices
Comment 6 Thomas Haller 2017-09-18 14:19:41 UTC
(In reply to Beniamino Galvani from comment #5)
> Created attachment 359989 [details] [review] [review]
> [PATCH] bluetooth: generate connections only for paired devices

lgtm
Comment 7 Bastien Nocera 2017-09-18 14:31:29 UTC
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?
Comment 8 Beniamino Galvani 2017-09-18 17:00:24 UTC
(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