mirror of
https://github.com/espressif/openthread.git
synced 2026-08-11 21:27:46 +00:00
filter out messages with a duplicated address (#661)
This commit is contained in:
committed by
Jonathan Hui
parent
786edd667a
commit
c806ebbdfc
@@ -1051,6 +1051,10 @@ void Mac::ReceiveDoneTask(Frame *aFrame, ThreadError aError)
|
||||
ExitNow(error = kThreadError_InvalidSourceAddress);
|
||||
}
|
||||
|
||||
// Duplicate Address Protection
|
||||
VerifyOrExit(memcmp(&srcaddr.mExtAddress, &mExtAddress, sizeof(srcaddr.mExtAddress)) != 0,
|
||||
error = kThreadError_InvalidSourceAddress; otLogDebgMac("duplicate address received\n"));
|
||||
|
||||
// Source Whitelist Processing
|
||||
if (srcaddr.mLength != 0 && mWhitelist.IsEnabled())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user