aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-05-18 13:20:32 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 10:39:05 -0700
commitf03585689fdff4ae256edd45a35bc2dd83d3684a (patch)
treebe1516aa354aa742f2d5b69a91de0561febaffc4 /net/bluetooth/hci_event.c
parent95ffa97827371ede501615d9bd048eb5b49e8fe1 (diff)
downloadkernel_samsung_smdk4412-f03585689fdff4ae256edd45a35bc2dd83d3684a.zip
kernel_samsung_smdk4412-f03585689fdff4ae256edd45a35bc2dd83d3684a.tar.gz
kernel_samsung_smdk4412-f03585689fdff4ae256edd45a35bc2dd83d3684a.tar.bz2
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 786b5de..43feeef 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
mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type);
- if (mask & HCI_LM_ACCEPT) {
+ if ((mask & HCI_LM_ACCEPT) && !hci_blacklist_lookup(hdev, &ev->bdaddr)) {
/* Connection accepted */
struct inquiry_entry *ie;
struct hci_conn *conn;