public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: When encryption is dropped, do not send RFCOMM tx packets.
@ 2009-02-03  2:13 jaikumar Ganesh
  2009-02-04 18:31 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: jaikumar Ganesh @ 2009-02-03  2:13 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

Hi Marcel,
    The patch for pausing RFCOMM tx traffic during the grace period
when the encryption is dropped (as a result of the role change) is
attached.

Thanks
Jaikumar

[-- Attachment #2: 0001-Bluetooth-When-encryption-is-dropped-do-not-send-R.patch --]
[-- Type: application/octet-stream, Size: 1101 bytes --]

From 42455699936fd3064044c3fe443e66cfea793ee1 Mon Sep 17 00:00:00 2001
From: Jaikumar Ganesh <jaikumar@google.com>
Date: Mon, 2 Feb 2009 18:03:57 -0800
Subject: [PATCH] Bluetooth: When encryption is dropped, do not send RFCOMM tx packets.

During a role change, the remote side drops the encryption of the RFCOMM
connection. We allow a grace period for the encryption to be reestablished,
before dropping the connection. During this grace period, the RFCOMM_SEC_PENDING
flag is set. Check this flag before sending RFCOMM tx packets.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
---
 net/bluetooth/rfcomm/core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index ad0e25a..3717c25 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -1749,6 +1749,9 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s)
 			continue;
 		}
 
+		if (test_bit(RFCOMM_SEC_PENDING, &d->flags))
+			continue;
+
 		if (test_bit(RFCOMM_TX_THROTTLED, &s->flags))
 			continue;
 
-- 
1.5.4.5


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

* Re: [PATCH] Bluetooth: When encryption is dropped, do not send RFCOMM tx  packets.
  2009-02-03  2:13 [PATCH] Bluetooth: When encryption is dropped, do not send RFCOMM tx packets jaikumar Ganesh
@ 2009-02-04 18:31 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2009-02-04 18:31 UTC (permalink / raw)
  To: jaikumar Ganesh; +Cc: linux-bluetooth

Hi Jaikumar,

>     The patch for pausing RFCOMM tx traffic during the grace period
> when the encryption is dropped (as a result of the role change) is
> attached.

patch has been applied to bluetooth-testing.git.

Regards

Marcel



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

end of thread, other threads:[~2009-02-04 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-03  2:13 [PATCH] Bluetooth: When encryption is dropped, do not send RFCOMM tx packets jaikumar Ganesh
2009-02-04 18:31 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox