mirror of
https://github.com/espressif/openthread.git
synced 2026-10-02 05:47:40 +00:00
[ip6] allow anycast source (#5747)
This commit allows IPv6 anycast as source address given it is not forbidden in standards.
This commit is contained in:
@@ -1075,8 +1075,7 @@ otError Ip6::SendRaw(Message &aMessage)
|
|||||||
bool freed = false;
|
bool freed = false;
|
||||||
|
|
||||||
SuccessOrExit(error = header.Init(aMessage));
|
SuccessOrExit(error = header.Init(aMessage));
|
||||||
VerifyOrExit(!header.GetSource().IsMulticast() && !Get<Mle::Mle>().IsAnycastLocator(header.GetSource()),
|
VerifyOrExit(!header.GetSource().IsMulticast(), error = OT_ERROR_INVALID_SOURCE_ADDRESS);
|
||||||
error = OT_ERROR_INVALID_SOURCE_ADDRESS);
|
|
||||||
|
|
||||||
messageInfo.SetPeerAddr(header.GetSource());
|
messageInfo.SetPeerAddr(header.GetSource());
|
||||||
messageInfo.SetSockAddr(header.GetDestination());
|
messageInfo.SetSockAddr(header.GetDestination());
|
||||||
|
|||||||
Reference in New Issue
Block a user