[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:
Yakun Xu
2020-10-30 15:55:10 -07:00
committed by GitHub
parent 050129a819
commit 466ebf4d60
+1 -2
View File
@@ -1075,8 +1075,7 @@ otError Ip6::SendRaw(Message &aMessage)
bool freed = false;
SuccessOrExit(error = header.Init(aMessage));
VerifyOrExit(!header.GetSource().IsMulticast() && !Get<Mle::Mle>().IsAnycastLocator(header.GetSource()),
error = OT_ERROR_INVALID_SOURCE_ADDRESS);
VerifyOrExit(!header.GetSource().IsMulticast(), error = OT_ERROR_INVALID_SOURCE_ADDRESS);
messageInfo.SetPeerAddr(header.GetSource());
messageInfo.SetSockAddr(header.GetDestination());