Skip to contentSkip to conversation

Bluetooth: Disable upper layer connections when user channel is active

PATCH In review Marcel Holtmann 3 participants 3 messages Sep 4, 2013 – Sep 10, 2013

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/2 Bluetooth: Disable upper layer connections when user channel is active

When the device has the user channel flag set, it means it is driven by an user application. In that case do not allow any connections from L2CAP or SCO sockets.

This is the same situation as when the device has the raw flag set and it will then return EHOSTUNREACH.

---
 net/bluetooth/hci_conn.c | 1 +
 1 file changed, 1 insertion(+)
net/bluetooth/hci_conn.c +1 -0
index f081712..d2380e0 100644
@@ -518,6 +518,7 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
 	list_for_each_entry(d, &hci_dev_list, list) {
 		if (!test_bit(HCI_UP, &d->flags) ||
 		    test_bit(HCI_RAW, &d->flags) ||
+		    test_bit(HCI_USER_CHANNEL, &d->dev_flags) ||
 		    d->dev_type != HCI_BREDR)
 			continue;
 
Signature · 1 line
1.8.3.1
Acked-by on v1 1/2
#1 lore raw

Hi Marcel,

Quoted 11 lines · Marcel Holtmann

When the device has the user channel flag set, it means it is driven by an user application. In that case do not allow any connections from L2CAP or SCO sockets.

This is the same situation as when the device has the raw flag set and it will then return EHOSTUNREACH.

---
 net/bluetooth/hci_conn.c | 1 +
 1 file changed, 1 insertion(+)

Johan

#2 lore raw
In reply to Marcel Holtmann

Hi Marcel,

2013-09-03 Marcel Holtmann <[email protected]>:

Quoted 11 lines

When the device has the user channel flag set, it means it is driven by an user application. In that case do not allow any connections from L2CAP or SCO sockets.

This is the same situation as when the device has the raw flag set and it will then return EHOSTUNREACH.

---
 net/bluetooth/hci_conn.c | 1 +
 1 file changed, 1 insertion(+)

Patch has been applied to bluetooth-next. Thanks.

Gustavo