Jelajahi Sumber

Bluetooth: Route traffic only through BR/EDR controller

If AMP controller is first in the list then Bluetooth traffic might
be routed through it (if source is not specified). The patch
prevents this case and also checks that source is BR/EDR.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Andrei Emeltchenko 13 tahun lalu
induk
melakukan
d300fa9b14
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      net/bluetooth/hci_conn.c

+ 2 - 1
net/bluetooth/hci_conn.c

@@ -442,7 +442,8 @@ struct hci_dev *hci_get_route(bdaddr_t *dst, bdaddr_t *src)
 
 
 	list_for_each_entry(d, &hci_dev_list, list) {
 	list_for_each_entry(d, &hci_dev_list, list) {
 		if (!test_bit(HCI_UP, &d->flags) ||
 		if (!test_bit(HCI_UP, &d->flags) ||
-		    test_bit(HCI_RAW, &d->flags))
+		    test_bit(HCI_RAW, &d->flags) ||
+		    d->dev_type != HCI_BREDR)
 			continue;
 			continue;
 
 
 		/* Simple routing:
 		/* Simple routing: