aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/rfcomm/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/rfcomm/core.c')
-rw-r--r--net/bluetooth/rfcomm/core.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 5ba3f6df665c..71ef2581c60f 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -1802,6 +1802,11 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s)
1802 continue; 1802 continue;
1803 } 1803 }
1804 1804
1805 if (test_bit(RFCOMM_ENC_DROP, &d->flags)) {
1806 __rfcomm_dlc_close(d, ECONNREFUSED);
1807 continue;
1808 }
1809
1805 if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) { 1810 if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) {
1806 rfcomm_dlc_clear_timer(d); 1811 rfcomm_dlc_clear_timer(d);
1807 if (d->out) { 1812 if (d->out) {
@@ -2074,7 +2079,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
2074 if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) { 2079 if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) {
2075 rfcomm_dlc_clear_timer(d); 2080 rfcomm_dlc_clear_timer(d);
2076 if (status || encrypt == 0x00) { 2081 if (status || encrypt == 0x00) {
2077 __rfcomm_dlc_close(d, ECONNREFUSED); 2082 set_bit(RFCOMM_ENC_DROP, &d->flags);
2078 continue; 2083 continue;
2079 } 2084 }
2080 } 2085 }
@@ -2085,7 +2090,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt)
2085 rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); 2090 rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT);
2086 continue; 2091 continue;
2087 } else if (d->sec_level == BT_SECURITY_HIGH) { 2092 } else if (d->sec_level == BT_SECURITY_HIGH) {
2088 __rfcomm_dlc_close(d, ECONNREFUSED); 2093 set_bit(RFCOMM_ENC_DROP, &d->flags);
2089 continue; 2094 continue;
2090 } 2095 }
2091 } 2096 }