mirror of
https://github.com/espressif/openthread.git
synced 2026-09-19 07:30:11 +00:00
Apply realm-local scope to mesh-local addresses for source address selection. (#1000)
This commit is contained in:
@@ -993,18 +993,18 @@ const NetifUnicastAddress *Ip6::SelectSourceAddress(MessageInfo &aMessageInfo)
|
||||
rvalIface = candidateId;
|
||||
goto exit;
|
||||
}
|
||||
else if (candidateAddr->GetScope() < rvalAddr->GetAddress().GetScope())
|
||||
else if (addr->GetScope() < rvalAddr->GetScope())
|
||||
{
|
||||
// Rule 2: Prefer appropriate scope
|
||||
if (candidateAddr->GetScope() >= destination->GetScope())
|
||||
if (addr->GetScope() >= destination->GetScope())
|
||||
{
|
||||
rvalAddr = addr;
|
||||
rvalIface = candidateId;
|
||||
}
|
||||
}
|
||||
else if (candidateAddr->GetScope() > rvalAddr->GetAddress().GetScope())
|
||||
else if (addr->GetScope() > rvalAddr->GetScope())
|
||||
{
|
||||
if (rvalAddr->GetAddress().GetScope() < destination->GetScope())
|
||||
if (rvalAddr->GetScope() < destination->GetScope())
|
||||
{
|
||||
rvalAddr = addr;
|
||||
rvalIface = candidateId;
|
||||
|
||||
Reference in New Issue
Block a user