mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 08:07:47 +00:00
[ip6] filter received packets with loopback addrs (#10998)
This commit is contained in:
@@ -1086,6 +1086,11 @@ Error Ip6::HandleDatagram(OwnedPtr<Message> aMessagePtr, bool aIsReassembled)
|
||||
|
||||
SuccessOrExit(error = header.ParseFrom(*aMessagePtr));
|
||||
|
||||
if (!aMessagePtr->IsOriginHostTrusted())
|
||||
{
|
||||
VerifyOrExit(!header.GetSource().IsLoopback() && !header.GetDestination().IsLoopback(), error = kErrorDrop);
|
||||
}
|
||||
|
||||
// Determine `forwardThread`, `forwardHost` and `receive`
|
||||
// based on the destination address.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user