aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-05-18 07:20:32 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:05 -0400
commitf03585689fdff4ae256edd45a35bc2dd83d3684a (patch)
treebe1516aa354aa742f2d5b69a91de0561febaffc4 /net/bluetooth/hci_event.c
parent95ffa97827371ede501615d9bd048eb5b49e8fe1 (diff)
Bluetooth: Add blacklist support for incoming connections
In some circumstances it could be desirable to reject incoming connections on the baseband level. This patch adds this feature through two new ioctl's: HCIBLOCKADDR and HCIUNBLOCKADDR. Both take a simple Bluetooth address as a parameter. BDADDR_ANY can be used with HCIUNBLOCKADDR to remove all devices from the blacklist. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 786b5de0bac4..43feeef3c498 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -952,7 +952,7 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
952 952
953 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type); 953 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type);
954 954
955 if (mask & HCI_LM_ACCEPT) { 955 if ((mask & HCI_LM_ACCEPT) && !hci_blacklist_lookup(hdev, &ev->bdaddr)) {
956 /* Connection accepted */ 956 /* Connection accepted */
957 struct inquiry_entry *ie; 957 struct inquiry_entry *ie;
958 struct hci_conn *conn; 958 struct hci_conn *conn;