Repository navigation
Commit 9e726b1
Bluetooth: Fix rejected connection not disconnecting ACL link
When using DEFER_SETUP on a RFCOMM socket, a SABM frame triggers
authorization which when rejected send a DM response. This is fine
according to the RFCOMM spec:
the responding implementation may replace the "proper" response
on the Multiplexer Control channel with a DM frame, sent on the
referenced DLCI to indicate that the DLCI is not open, and that
the responder would not grant a request to open it later either.
But some stacks doesn't seems to cope with this leaving DLCI 0 open after
receiving DM frame.
To fix it properly a timer was introduced to rfcomm_session which is used
to set a timeout when the last active DLC of a session is unlinked, this
will give the remote stack some time to reply with a proper DISC frame on
DLCI 0 avoiding both sides sending DISC to each other on stacks that
follow the specification and taking care of those who don't by taking
down DLCI 0.
Signed-off-by: Luiz Augusto von Dentz <luiz.dentz@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>1 parent ef54fd9 commit 9e726b1
2 files changed
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
247 | 274 | | |
248 | 275 | | |
249 | 276 | | |
| |||
320 | 347 | | |
321 | 348 | | |
322 | 349 | | |
| 350 | + | |
323 | 351 | | |
324 | 352 | | |
325 | 353 | | |
| |||
335 | 363 | | |
336 | 364 | | |
337 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
338 | 369 | | |
339 | 370 | | |
340 | 371 | | |
| |||
567 | 598 | | |
568 | 599 | | |
569 | 600 | | |
| 601 | + | |
| 602 | + | |
570 | 603 | | |
571 | 604 | | |
572 | 605 | | |
| |||
598 | 631 | | |
599 | 632 | | |
600 | 633 | | |
| 634 | + | |
601 | 635 | | |
602 | 636 | | |
603 | 637 | | |
| |||
639 | 673 | | |
640 | 674 | | |
641 | 675 | | |
| 676 | + | |
642 | 677 | | |
643 | 678 | | |
644 | 679 | | |
| |||
1879 | 1914 | | |
1880 | 1915 | | |
1881 | 1916 | | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
1882 | 1923 | | |
1883 | 1924 | | |
1884 | 1925 | | |
| |||
0 commit comments