public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: jaikumar Ganesh <jaikumarg@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Bluetooth: When encryption is dropped, do not send RFCOMM tx packets.
Date: Mon, 2 Feb 2009 18:13:13 -0800	[thread overview]
Message-ID: <ac290f760902021813k7231971cx8fac6aea6fdd7569@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2009-02-03  2:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03  2:13 jaikumar Ganesh [this message]
2009-02-04 18:31 ` [PATCH] Bluetooth: When encryption is dropped, do not send RFCOMM tx packets Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac290f760902021813k7231971cx8fac6aea6fdd7569@mail.gmail.com \
    --to=jaikumarg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox