mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
[routing-manager] allow old deprecating PIOs when checking RA is from router (#8193)
This commit updates `IsReceivedRouterAdvertFromManager()` which checks if a received RA message was prepared by the `RoutingManager module itself to allow deprecating PIOs in the RA message. These will handle the case when old on-link prefix(es) (e.g., on extended PAN ID change) are being deprecated.
This commit is contained in:
committed by
GitHub
parent
fe655f4ef1
commit
da45d327c7
@@ -810,14 +810,19 @@ bool RoutingManager::IsReceivedRouterAdvertFromManager(const Ip6::Nd::RouterAdve
|
||||
{
|
||||
case Ip6::Nd::Option::kTypePrefixInfo:
|
||||
{
|
||||
// PIO should match `mLocalOnLinkPrefix`.
|
||||
|
||||
const Ip6::Nd::PrefixInfoOption &pio = static_cast<const Ip6::Nd::PrefixInfoOption &>(option);
|
||||
|
||||
VerifyOrExit(pio.IsValid());
|
||||
pio.GetPrefix(prefix);
|
||||
|
||||
VerifyOrExit(prefix == mLocalOnLinkPrefix.GetPrefix());
|
||||
// If it is a non-deprecated PIO, it should match the
|
||||
// local on-link prefix.
|
||||
|
||||
if (pio.GetPreferredLifetime() > 0)
|
||||
{
|
||||
VerifyOrExit(prefix == mLocalOnLinkPrefix.GetPrefix());
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user