Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277713
b: refs/heads/master
c: db54467
h: refs/heads/master
i:
  277711: 34d3159
v: v3
  • Loading branch information
Szymon Janc authored and Gustavo F. Padovan committed Nov 7, 2011
1 parent 75402f6 commit a14b523
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 164a6e78990f6201dc3105ff88335ca91392a427
refs/heads/master: db54467a89266c02f9ce6c6db1d193365cff62a4
1 change: 1 addition & 0 deletions trunk/include/net/bluetooth/rfcomm.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ struct rfcomm_dlc {
#define RFCOMM_AUTH_ACCEPT 6
#define RFCOMM_AUTH_REJECT 7
#define RFCOMM_DEFER_SETUP 8
#define RFCOMM_ENC_DROP 9

/* Scheduling flags and events */
#define RFCOMM_SCHED_WAKEUP 31
Expand Down
9 changes: 7 additions & 2 deletions trunk/net/bluetooth/rfcomm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,11 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s)
continue;
}

if (test_bit(RFCOMM_ENC_DROP, &d->flags)) {
__rfcomm_dlc_close(d, ECONNREFUSED);
continue;
}

if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) {
rfcomm_dlc_clear_timer(d);
if (d->out) {
Expand Down Expand Up @@ -2094,7 +2099,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) {
rfcomm_dlc_clear_timer(d);
if (status || encrypt == 0x00) {
__rfcomm_dlc_close(d, ECONNREFUSED);
set_bit(RFCOMM_ENC_DROP, &d->flags);
continue;
}
}
Expand All @@ -2105,7 +2110,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT);
continue;
} else if (d->sec_level == BT_SECURITY_HIGH) {
__rfcomm_dlc_close(d, ECONNREFUSED);
set_bit(RFCOMM_ENC_DROP, &d->flags);
continue;
}
}
Expand Down

0 comments on commit a14b523

Please sign in to comment.