mirror of
https://github.com/espressif/openthread.git
synced 2026-09-19 07:30:11 +00:00
[ip6] do not free the same message twice while handling IPv6 fragment (#4940)
This commit fixes the serious bug when IPv6 fragmentation is enabled. It is possible that HandleDatagram which is called on complete reassembly, returns the error (e.g. because ICMPv6 Echo Response can't be generated due to lack of buffers). In such case both HandleDatagram method and HandleFragment tries to free the same message which finally ends up in a crash of the system.
This commit is contained in:
committed by
Jonathan Hui
parent
9aa7340eb2
commit
069afa5a17
@@ -820,7 +820,7 @@ otError Ip6::HandleFragment(Message &aMessage, Netif *aNetif, MessageInfo &aMess
|
||||
|
||||
mReassemblyList.Dequeue(*message);
|
||||
|
||||
error = HandleDatagram(*message, aNetif, aMessageInfo.mLinkInfo, aFromNcpHost);
|
||||
IgnoreError(HandleDatagram(*message, aNetif, aMessageInfo.mLinkInfo, aFromNcpHost));
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
Reference in New Issue
Block a user