mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
l2cap: check packet size against local mtu for classic basic channels
This commit is contained in:
parent
4fc83f45ae
commit
0763891b99
@ -12,7 +12,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- L2CAP: use connection handle for channel lookups
|
||||
- L2CAP: forward data only in open state
|
||||
### Added
|
||||
|
||||
### Changed
|
||||
- L2CAP: check packet size against local mtu for classic basic channels
|
||||
|
||||
|
||||
## Release v1.2
|
||||
|
@ -3538,8 +3538,11 @@ static void l2cap_acl_classic_handler_for_channel(l2cap_channel_t * l2cap_channe
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
l2cap_dispatch_to_channel(l2cap_channel, L2CAP_DATA_PACKET, &packet[COMPLETE_L2CAP_HEADER], size-COMPLETE_L2CAP_HEADER);
|
||||
|
||||
// check size
|
||||
if (l2cap_channel->local_mtu < size) return;
|
||||
|
||||
l2cap_dispatch_to_channel(l2cap_channel, L2CAP_DATA_PACKET, &packet[COMPLETE_L2CAP_HEADER], size-COMPLETE_L2CAP_HEADER);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user