Skip to content

Commit

Permalink
Bluetooth: When encryption is dropped, do not send RFCOMM packets
Browse files Browse the repository at this point in the history
During a role change with pre-Bluetooth 2.1 devices, the remote side drops
the encryption of the RFCOMM connection. We allow a grace period for the
encryption to be re-established, before dropping the connection. During
this grace period, the RFCOMM_SEC_PENDING flag is set. Check this flag
before sending RFCOMM packets.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Jaikumar Ganesh authored and Marcel Holtmann committed Feb 27, 2009
1 parent 34a55ed commit 6e1031a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/bluetooth/rfcomm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6e1031a

Please sign in to comment.