netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pull request: bluetooth-2.6 2009-11-16
@ 2009-11-16  0:48 Marcel Holtmann
  2009-11-16  0:48 ` [PATCH 1/3] Bluetooth: Set general bonding security for ACL by default Marcel Holtmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Hi Dave,

here are three additional patches that should go into 2.6.32 before its
final release.

The first one fixes a regression with Secure Simple Pairing support. I
had that patch for a while, but it took some time to verify that it
doesn't break the Bluetooth qualification. The Bluetooth 2.1 GAP testing
is a major pain and always surprises you.

The second and third patches are fixing two regression from the L2CAP
ERTM support. When ERTM is not supported or not configured we have to
use Basic Mode and really stick to it. Other Bluetooth stacks are not
capable of handling unknown options properly.

Regards

Marcel


Please pull from

    git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git master

This will update the following files:

 net/bluetooth/hci_conn.c |    1 +
 net/bluetooth/l2cap.c    |   13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

through these ChangeSets:

Andrei Emeltchenko (1):
    Bluetooth: Set general bonding security for ACL by default

Gustavo F. Padovan (2):
    Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET
    Bluetooth: Fix regression with L2CAP configuration in Basic Mode


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] Bluetooth: Set general bonding security for ACL by default
  2009-11-16  0:48 Pull request: bluetooth-2.6 2009-11-16 Marcel Holtmann
@ 2009-11-16  0:48 ` Marcel Holtmann
  2009-11-16  0:48 ` [PATCH 2/3] Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET Marcel Holtmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>

This patch fixes double pairing issues with Secure Simple
Paring support. It was observed that when pairing with SSP
enabled, that the confirmation will be asked twice.

http://www.spinics.net/lists/linux-bluetooth/msg02473.html

This also causes bug when initiating SSP connection from
Windows Vista.

The reason is because bluetoothd does not store link keys
since HCIGETAUTHINFO returns 0. Setting default to general
bonding fixes these issues.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_conn.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index a975098..b7c4224 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -211,6 +211,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
 	conn->type  = type;
 	conn->mode  = HCI_CM_ACTIVE;
 	conn->state = BT_OPEN;
+	conn->auth_type = HCI_AT_GENERAL_BONDING;
 
 	conn->power_save = 1;
 	conn->disc_timeout = HCI_DISCONN_TIMEOUT;
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET
  2009-11-16  0:48 Pull request: bluetooth-2.6 2009-11-16 Marcel Holtmann
  2009-11-16  0:48 ` [PATCH 1/3] Bluetooth: Set general bonding security for ACL by default Marcel Holtmann
@ 2009-11-16  0:48 ` Marcel Holtmann
  2009-11-16  0:48 ` [PATCH 3/3] Bluetooth: Fix regression with L2CAP configuration in Basic Mode Marcel Holtmann
  2009-11-16  5:01 ` Pull request: bluetooth-2.6 2009-11-16 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

From: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>

The default mode for SOCK_SEQPACKET is Basic Mode. So when no
mode has been specified, Basic Mode shall be used.

This is important for current application to keep working as
expected and not cause a regression.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/l2cap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 77e9fb1..076caa1 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2205,7 +2205,7 @@ static int l2cap_build_conf_req(struct sock *sk, void *data)
 {
 	struct l2cap_pinfo *pi = l2cap_pi(sk);
 	struct l2cap_conf_req *req = data;
-	struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_ERTM };
+	struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
 	void *ptr = req->data;
 
 	BT_DBG("sk %p", sk);
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] Bluetooth: Fix regression with L2CAP configuration in Basic Mode
  2009-11-16  0:48 Pull request: bluetooth-2.6 2009-11-16 Marcel Holtmann
  2009-11-16  0:48 ` [PATCH 1/3] Bluetooth: Set general bonding security for ACL by default Marcel Holtmann
  2009-11-16  0:48 ` [PATCH 2/3] Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET Marcel Holtmann
@ 2009-11-16  0:48 ` Marcel Holtmann
  2009-11-16  5:01 ` Pull request: bluetooth-2.6 2009-11-16 David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2009-11-16  0:48 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

From: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>

Basic Mode is the default mode of operation of a L2CAP entity. In
this case the RFC (Retransmission and Flow Control) configuration
option should not be used at all.

Normally remote L2CAP implementation should just ignore this option,
but it can cause various side effects with other Bluetooth stacks
that are not capable of handling unknown options.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/l2cap.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 076caa1..947f8bb 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2394,6 +2394,10 @@ done:
 			rfc.monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
 
 			pi->conf_state |= L2CAP_CONF_MODE_DONE;
+
+			l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
+					sizeof(rfc), (unsigned long) &rfc);
+
 			break;
 
 		case L2CAP_MODE_STREAMING:
@@ -2401,6 +2405,10 @@ done:
 			pi->max_pdu_size = rfc.max_pdu_size;
 
 			pi->conf_state |= L2CAP_CONF_MODE_DONE;
+
+			l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
+					sizeof(rfc), (unsigned long) &rfc);
+
 			break;
 
 		default:
@@ -2410,9 +2418,6 @@ done:
 			rfc.mode = pi->mode;
 		}
 
-		l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
-					sizeof(rfc), (unsigned long) &rfc);
-
 		if (result == L2CAP_CONF_SUCCESS)
 			pi->conf_state |= L2CAP_CONF_OUTPUT_DONE;
 	}
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Pull request: bluetooth-2.6 2009-11-16
  2009-11-16  0:48 Pull request: bluetooth-2.6 2009-11-16 Marcel Holtmann
                   ` (2 preceding siblings ...)
  2009-11-16  0:48 ` [PATCH 3/3] Bluetooth: Fix regression with L2CAP configuration in Basic Mode Marcel Holtmann
@ 2009-11-16  5:01 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2009-11-16  5:01 UTC (permalink / raw)
  To: marcel; +Cc: netdev

From: Marcel Holtmann <marcel@holtmann.org>
Date: Mon, 16 Nov 2009 01:48:20 +0100

> Please pull from
> 
>     git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git master

Pulled, thanks a lot.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-16  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16  0:48 Pull request: bluetooth-2.6 2009-11-16 Marcel Holtmann
2009-11-16  0:48 ` [PATCH 1/3] Bluetooth: Set general bonding security for ACL by default Marcel Holtmann
2009-11-16  0:48 ` [PATCH 2/3] Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET Marcel Holtmann
2009-11-16  0:48 ` [PATCH 3/3] Bluetooth: Fix regression with L2CAP configuration in Basic Mode Marcel Holtmann
2009-11-16  5:01 ` Pull request: bluetooth-2.6 2009-11-16 David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).