summaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/rfcomm.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-02-09 20:59:10 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-02-14 13:39:30 -0800
commitc10a848cea89a8f0418fa0efec33c4e8507aab4b (patch)
tree1c6eaf6a370f29ca4438bac6a8654c1fabbb1ae2 /include/net/bluetooth/rfcomm.h
parentc949c224cfd7d5445ef947e8b93c0657323d5be5 (diff)
downloadblackbird-op-linux-c10a848cea89a8f0418fa0efec33c4e8507aab4b.tar.gz
blackbird-op-linux-c10a848cea89a8f0418fa0efec33c4e8507aab4b.zip
Bluetooth: Verify dlci not in use before rfcomm_dev create
Only one session/channel combination may be in use at any one time. However, the failure does not occur until the tty is opened (in rfcomm_dlc_open()). Because these settings are actually bound at rfcomm device creation (via RFCOMMCREATEDEV ioctl), validate and fail before creating the rfcomm tty device. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Tested-By: Alexander Holler <holler@ahsoftware.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/rfcomm.h')
-rw-r--r--include/net/bluetooth/rfcomm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 0d69936831fa..f8262a2783ec 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -241,6 +241,7 @@ int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb);
int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig);
int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig);
void rfcomm_dlc_accept(struct rfcomm_dlc *d);
+struct rfcomm_dlc *rfcomm_dlc_exists(bdaddr_t *src, bdaddr_t *dst, u8 channel);
#define rfcomm_dlc_lock(d) spin_lock(&d->lock)
#define rfcomm_dlc_unlock(d) spin_unlock(&d->lock)
OpenPOWER on IntegriCloud