Bluetooth: Fix to set proper bdaddr_type for RFCOMM connect

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 22 17:59:06 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8992da099332db896144465a01ad636f58bdebd9
Commit:     8992da099332db896144465a01ad636f58bdebd9
Parent:     c507f138fc7c2025d75b65018810dc0561d0bdb9
Author:     Seung-Woo Kim <sw0312.kim at samsung.com>
AuthorDate: Tue Nov 5 17:15:42 2013 +0900
Committer:  Gustavo Padovan <gustavo.padovan at collabora.co.uk>
CommitDate: Wed Nov 13 11:36:53 2013 -0200

    Bluetooth: Fix to set proper bdaddr_type for RFCOMM connect
    
    L2CAP socket validates proper bdaddr_type for connect, so this
    patch fixes to set explictly bdaddr_type for RFCOMM connect.
    
    Signed-off-by: Seung-Woo Kim <sw0312.kim at samsung.com>
    Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
---
 net/bluetooth/rfcomm/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 292fa64..ce75211 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -720,6 +720,7 @@ static struct rfcomm_session *rfcomm_session_create(bdaddr_t *src,
 	addr.l2_family = AF_BLUETOOTH;
 	addr.l2_psm    = __constant_cpu_to_le16(RFCOMM_PSM);
 	addr.l2_cid    = 0;
+	addr.l2_bdaddr_type = BDADDR_BREDR;
 	*err = kernel_connect(sock, (struct sockaddr *) &addr, sizeof(addr), O_NONBLOCK);
 	if (*err == 0 || *err == -EINPROGRESS)
 		return s;



More information about the linux-mtd-cvs mailing list