From 466ebf4d60a7afbe1321895f41aa63f7ef83eb70 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Sat, 31 Oct 2020 06:55:10 +0800 Subject: [PATCH] [ip6] allow anycast source (#5747) This commit allows IPv6 anycast as source address given it is not forbidden in standards. --- src/core/net/ip6.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 4395881c0..fcfc59226 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -1075,8 +1075,7 @@ otError Ip6::SendRaw(Message &aMessage) bool freed = false; SuccessOrExit(error = header.Init(aMessage)); - VerifyOrExit(!header.GetSource().IsMulticast() && !Get().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());