]> Pileus Git - ~andy/linux/commitdiff
Bluetooth: Route traffic only through BR/EDR controller
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Tue, 19 Jun 2012 12:21:21 +0000 (15:21 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 30 Jun 2012 15:15:32 +0000 (12:15 -0300)
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>
net/bluetooth/hci_conn.c

index 9bbef6e95d2cca5c587834095eb97eff2fc05ff1..5ad7da21747413f50ba0106041c6e73d6ce727d4 100644 (file)
@@ -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) {
                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;
 
                /* Simple routing: