[routing-manager] update log messages (#6818)

This commit updates the logs in `RoutingManager` so that the log
messages start with capital letter (making them consistent with
logs in other modules).
This commit is contained in:
Abtin Keshavarzian
2021-07-15 13:03:33 -07:00
committed by GitHub
parent 9f4258d2ea
commit 625e088e52
+44 -44
View File
@@ -129,12 +129,12 @@ Error RoutingManager::LoadOrGenerateRandomOmrPrefix(void)
{ {
Ip6::NetworkPrefix randomOmrPrefix; Ip6::NetworkPrefix randomOmrPrefix;
otLogNoteBr("no valid OMR prefix found in settings, generating new one"); otLogNoteBr("No valid OMR prefix found in settings, generating new one");
error = randomOmrPrefix.GenerateRandomUla(); error = randomOmrPrefix.GenerateRandomUla();
if (error != kErrorNone) if (error != kErrorNone)
{ {
otLogCritBr("failed to generate random OMR prefix"); otLogCritBr("Failed to generate random OMR prefix");
ExitNow(); ExitNow();
} }
@@ -155,12 +155,12 @@ Error RoutingManager::LoadOrGenerateRandomOnLinkPrefix(void)
{ {
Ip6::NetworkPrefix randomOnLinkPrefix; Ip6::NetworkPrefix randomOnLinkPrefix;
otLogNoteBr("no valid on-link prefix found in settings, generating new one"); otLogNoteBr("No valid on-link prefix found in settings, generating new one");
error = randomOnLinkPrefix.GenerateRandomUla(); error = randomOnLinkPrefix.GenerateRandomUla();
if (error != kErrorNone) if (error != kErrorNone)
{ {
otLogCritBr("failed to generate random on-link prefix"); otLogCritBr("Failed to generate random on-link prefix");
ExitNow(); ExitNow();
} }
@@ -268,7 +268,7 @@ void RoutingManager::RecvIcmp6Message(uint32_t aInfraIfIndex,
exit: exit:
if (error != kErrorNone) if (error != kErrorNone)
{ {
otLogDebgBr("drop ICMPv6 message: %s", ErrorToString(error)); otLogDebgBr("Dropped ICMPv6 message: %s", ErrorToString(error));
} }
} }
@@ -280,7 +280,7 @@ Error RoutingManager::HandleInfraIfStateChanged(uint32_t aInfraIfIndex, bool aIs
VerifyOrExit(aInfraIfIndex == mInfraIfIndex, error = kErrorInvalidArgs); VerifyOrExit(aInfraIfIndex == mInfraIfIndex, error = kErrorInvalidArgs);
VerifyOrExit(aIsRunning != mInfraIfIsRunning); VerifyOrExit(aIsRunning != mInfraIfIsRunning);
otLogInfoBr("infra interface (%u) state changed: %sRUNNING -> %sRUNNING", aInfraIfIndex, otLogInfoBr("Infra interface (%u) state changed: %sRUNNING -> %sRUNNING", aInfraIfIndex,
(mInfraIfIsRunning ? "" : "NOT "), (aIsRunning ? "" : "NOT ")); (mInfraIfIsRunning ? "" : "NOT "), (aIsRunning ? "" : "NOT "));
mInfraIfIsRunning = aIsRunning; mInfraIfIsRunning = aIsRunning;
@@ -341,7 +341,7 @@ uint8_t RoutingManager::EvaluateOmrPrefix(Ip6::Prefix *aNewOmrPrefixes, uint8_t
if (newOmrPrefixNum >= aMaxOmrPrefixNum) if (newOmrPrefixNum >= aMaxOmrPrefixNum)
{ {
otLogWarnBr("EvaluateOmrPrefix: too many OMR prefixes, ignoring prefix %s", otLogWarnBr("EvaluateOmrPrefix: Too many OMR prefixes, ignoring prefix %s",
onMeshPrefixConfig.GetPrefix().ToString().AsCString()); onMeshPrefixConfig.GetPrefix().ToString().AsCString());
continue; continue;
} }
@@ -361,7 +361,7 @@ uint8_t RoutingManager::EvaluateOmrPrefix(Ip6::Prefix *aNewOmrPrefixes, uint8_t
// Decide if we need to add or remove my local OMR prefix. // Decide if we need to add or remove my local OMR prefix.
if (newOmrPrefixNum == 0) if (newOmrPrefixNum == 0)
{ {
otLogInfoBr("EvaluateOmrPrefix: no valid OMR prefixes found in Thread network"); otLogInfoBr("EvaluateOmrPrefix: No valid OMR prefixes found in Thread network");
if (PublishLocalOmrPrefix() == kErrorNone) if (PublishLocalOmrPrefix() == kErrorNone)
{ {
aNewOmrPrefixes[newOmrPrefixNum++] = mLocalOmrPrefix; aNewOmrPrefixes[newOmrPrefixNum++] = mLocalOmrPrefix;
@@ -371,7 +371,7 @@ uint8_t RoutingManager::EvaluateOmrPrefix(Ip6::Prefix *aNewOmrPrefixes, uint8_t
} }
else if (publishedLocalOmrPrefix != nullptr && smallestOmrPrefix != publishedLocalOmrPrefix) else if (publishedLocalOmrPrefix != nullptr && smallestOmrPrefix != publishedLocalOmrPrefix)
{ {
otLogInfoBr("EvaluateOmrPrefix: there is already a smaller OMR prefix %s in the Thread network", otLogInfoBr("EvaluateOmrPrefix: There is already a smaller OMR prefix %s in the Thread network",
smallestOmrPrefix->ToString().AsCString()); smallestOmrPrefix->ToString().AsCString());
UnpublishLocalOmrPrefix(); UnpublishLocalOmrPrefix();
@@ -401,13 +401,13 @@ Error RoutingManager::PublishLocalOmrPrefix(void)
error = Get<NetworkData::Local>().AddOnMeshPrefix(omrPrefixConfig); error = Get<NetworkData::Local>().AddOnMeshPrefix(omrPrefixConfig);
if (error != kErrorNone) if (error != kErrorNone)
{ {
otLogWarnBr("failed to publish local OMR prefix %s in Thread network: %s", otLogWarnBr("Failed to publish local OMR prefix %s in Thread network: %s",
mLocalOmrPrefix.ToString().AsCString(), ErrorToString(error)); mLocalOmrPrefix.ToString().AsCString(), ErrorToString(error));
} }
else else
{ {
Get<NetworkData::Notifier>().HandleServerDataUpdated(); Get<NetworkData::Notifier>().HandleServerDataUpdated();
otLogInfoBr("published local OMR prefix %s in Thread network", mLocalOmrPrefix.ToString().AsCString()); otLogInfoBr("Published local OMR prefix %s in Thread network", mLocalOmrPrefix.ToString().AsCString());
} }
return error; return error;
@@ -422,12 +422,12 @@ void RoutingManager::UnpublishLocalOmrPrefix(void)
SuccessOrExit(error = Get<NetworkData::Local>().RemoveOnMeshPrefix(mLocalOmrPrefix)); SuccessOrExit(error = Get<NetworkData::Local>().RemoveOnMeshPrefix(mLocalOmrPrefix));
Get<NetworkData::Notifier>().HandleServerDataUpdated(); Get<NetworkData::Notifier>().HandleServerDataUpdated();
otLogInfoBr("unpublished local OMR prefix %s from Thread network", mLocalOmrPrefix.ToString().AsCString()); otLogInfoBr("Unpublished local OMR prefix %s from Thread network", mLocalOmrPrefix.ToString().AsCString());
exit: exit:
if (error != kErrorNone) if (error != kErrorNone)
{ {
otLogWarnBr("failed to unpublish local OMR prefix %s from Thread network: %s", otLogWarnBr("Failed to unpublish local OMR prefix %s from Thread network: %s",
mLocalOmrPrefix.ToString().AsCString(), ErrorToString(error)); mLocalOmrPrefix.ToString().AsCString(), ErrorToString(error));
} }
} }
@@ -447,12 +447,12 @@ Error RoutingManager::AddExternalRoute(const Ip6::Prefix &aPrefix, otRoutePrefer
error = Get<NetworkData::Local>().AddHasRoutePrefix(routeConfig); error = Get<NetworkData::Local>().AddHasRoutePrefix(routeConfig);
if (error != kErrorNone) if (error != kErrorNone)
{ {
otLogWarnBr("failed to add external route %s: %s", aPrefix.ToString().AsCString(), ErrorToString(error)); otLogWarnBr("Failed to add external route %s: %s", aPrefix.ToString().AsCString(), ErrorToString(error));
} }
else else
{ {
Get<NetworkData::Notifier>().HandleServerDataUpdated(); Get<NetworkData::Notifier>().HandleServerDataUpdated();
otLogInfoBr("added external route %s", aPrefix.ToString().AsCString()); otLogInfoBr("Added external route %s", aPrefix.ToString().AsCString());
} }
return error; return error;
@@ -467,12 +467,12 @@ void RoutingManager::RemoveExternalRoute(const Ip6::Prefix &aPrefix)
SuccessOrExit(error = Get<NetworkData::Local>().RemoveHasRoutePrefix(aPrefix)); SuccessOrExit(error = Get<NetworkData::Local>().RemoveHasRoutePrefix(aPrefix));
Get<NetworkData::Notifier>().HandleServerDataUpdated(); Get<NetworkData::Notifier>().HandleServerDataUpdated();
otLogInfoBr("removed external route %s", aPrefix.ToString().AsCString()); otLogInfoBr("Removed external route %s", aPrefix.ToString().AsCString());
exit: exit:
if (error != kErrorNone) if (error != kErrorNone)
{ {
otLogWarnBr("failed to remove external route %s: %s", aPrefix.ToString().AsCString(), ErrorToString(error)); otLogWarnBr("Failed to remove external route %s: %s", aPrefix.ToString().AsCString(), ErrorToString(error));
} }
} }
@@ -539,7 +539,7 @@ const Ip6::Prefix *RoutingManager::EvaluateOnLinkPrefix(void)
} }
else else
{ {
otLogInfoBr("EvaluateOnLinkPrefix: there is already smaller on-link prefix %s on interface %u", otLogInfoBr("EvaluateOnLinkPrefix: There is already smaller on-link prefix %s on interface %u",
smallestOnLinkPrefix->ToString().AsCString(), mInfraIfIndex); smallestOnLinkPrefix->ToString().AsCString(), mInfraIfIndex);
// TODO: we remove the advertised on-link prefix by setting zero valid lifetime for PIO, // TODO: we remove the advertised on-link prefix by setting zero valid lifetime for PIO,
@@ -568,7 +568,7 @@ void RoutingManager::EvaluateRoutingPolicy(void)
Ip6::Prefix newOmrPrefixes[kMaxOmrPrefixNum]; Ip6::Prefix newOmrPrefixes[kMaxOmrPrefixNum];
uint8_t newOmrPrefixNum = 0; uint8_t newOmrPrefixNum = 0;
otLogInfoBr("evaluating routing policy"); otLogInfoBr("Evaluating routing policy");
// 0. Evaluate on-link & OMR prefixes. // 0. Evaluate on-link & OMR prefixes.
newOnLinkPrefix = EvaluateOnLinkPrefix(); newOnLinkPrefix = EvaluateOnLinkPrefix();
@@ -581,7 +581,7 @@ void RoutingManager::EvaluateRoutingPolicy(void)
// This is the very exceptional case and happens only when we failed to publish // This is the very exceptional case and happens only when we failed to publish
// our local OMR prefix to the Thread network. We schedule the Router Advertisement // our local OMR prefix to the Thread network. We schedule the Router Advertisement
// timer to re-evaluate our routing policy in the future. // timer to re-evaluate our routing policy in the future.
otLogWarnBr("no OMR prefix advertised! Start Router Advertisement timer for future evaluation"); otLogWarnBr("No OMR prefix advertised! Start Router Advertisement timer for future evaluation");
} }
// 2. Schedule Router Advertisement timer with random interval. // 2. Schedule Router Advertisement timer with random interval.
@@ -595,7 +595,7 @@ void RoutingManager::EvaluateRoutingPolicy(void)
nextSendTime = kMaxInitRtrAdvInterval; nextSendTime = kMaxInitRtrAdvInterval;
} }
otLogInfoBr("router advertisement scheduled in %u seconds", nextSendTime); otLogInfoBr("Router advertisement scheduled in %u seconds", nextSendTime);
mRouterAdvertisementTimer.Start(Time::SecToMsec(nextSendTime)); mRouterAdvertisementTimer.Start(Time::SecToMsec(nextSendTime));
} }
@@ -615,7 +615,7 @@ void RoutingManager::StartRoutingPolicyEvaluationDelay(void)
static_assert(kMaxRoutingPolicyDelay > 0, "invalid maximum routing policy evaluation delay"); static_assert(kMaxRoutingPolicyDelay > 0, "invalid maximum routing policy evaluation delay");
randomDelay = Random::NonCrypto::GetUint32InRange(0, Time::SecToMsec(kMaxRoutingPolicyDelay)); randomDelay = Random::NonCrypto::GetUint32InRange(0, Time::SecToMsec(kMaxRoutingPolicyDelay));
otLogInfoBr("start evaluating routing policy, scheduled in %u milliseconds", randomDelay); otLogInfoBr("Start evaluating routing policy, scheduled in %u milliseconds", randomDelay);
mRoutingPolicyTimer.Start(randomDelay); mRoutingPolicyTimer.Start(randomDelay);
} }
@@ -632,7 +632,7 @@ void RoutingManager::StartRouterSolicitationDelay(void)
static_assert(kMaxRtrSolicitationDelay > 0, "invalid maximum Router Solicitation delay"); static_assert(kMaxRtrSolicitationDelay > 0, "invalid maximum Router Solicitation delay");
randomDelay = Random::NonCrypto::GetUint32InRange(0, Time::SecToMsec(kMaxRtrSolicitationDelay)); randomDelay = Random::NonCrypto::GetUint32InRange(0, Time::SecToMsec(kMaxRtrSolicitationDelay));
otLogInfoBr("start Router Solicitation, scheduled in %u milliseconds", randomDelay); otLogInfoBr("Start Router Solicitation, scheduled in %u milliseconds", randomDelay);
mTimeRouterSolicitStart = TimerMilli::GetNow(); mTimeRouterSolicitStart = TimerMilli::GetNow();
mRouterSolicitTimer.Start(randomDelay); mRouterSolicitTimer.Start(randomDelay);
@@ -686,11 +686,11 @@ void RoutingManager::SendRouterAdvertisement(const Ip6::Prefix *aNewOmrPrefixes,
if (mAdvertisedOnLinkPrefix == nullptr) if (mAdvertisedOnLinkPrefix == nullptr)
{ {
otLogInfoBr("start advertising new on-link prefix %s on interface %u", otLogInfoBr("Start advertising new on-link prefix %s on interface %u",
aNewOnLinkPrefix->ToString().AsCString(), mInfraIfIndex); aNewOnLinkPrefix->ToString().AsCString(), mInfraIfIndex);
} }
otLogInfoBr("send on-link prefix %s in PIO (valid lifetime = %u seconds)", otLogInfoBr("Send on-link prefix %s in PIO (valid lifetime = %u seconds)",
aNewOnLinkPrefix->ToString().AsCString(), kDefaultOnLinkPrefixLifetime); aNewOnLinkPrefix->ToString().AsCString(), kDefaultOnLinkPrefixLifetime);
} }
else if (mAdvertisedOnLinkPrefix != nullptr) else if (mAdvertisedOnLinkPrefix != nullptr)
@@ -709,7 +709,7 @@ void RoutingManager::SendRouterAdvertisement(const Ip6::Prefix *aNewOmrPrefixes,
memcpy(buffer + bufferLength, &pio, pio.GetSize()); memcpy(buffer + bufferLength, &pio, pio.GetSize());
bufferLength += pio.GetSize(); bufferLength += pio.GetSize();
otLogInfoBr("stop advertising on-link prefix %s on interface %u", otLogInfoBr("Stop advertising on-link prefix %s on interface %u",
mAdvertisedOnLinkPrefix->ToString().AsCString(), mInfraIfIndex); mAdvertisedOnLinkPrefix->ToString().AsCString(), mInfraIfIndex);
} }
@@ -730,7 +730,7 @@ void RoutingManager::SendRouterAdvertisement(const Ip6::Prefix *aNewOmrPrefixes,
memcpy(buffer + bufferLength, &rio, rio.GetSize()); memcpy(buffer + bufferLength, &rio, rio.GetSize());
bufferLength += rio.GetSize(); bufferLength += rio.GetSize();
otLogInfoBr("stop advertising OMR prefix %s on interface %u", advertisedOmrPrefix.ToString().AsCString(), otLogInfoBr("Stop advertising OMR prefix %s on interface %u", advertisedOmrPrefix.ToString().AsCString(),
mInfraIfIndex); mInfraIfIndex);
} }
} }
@@ -747,7 +747,7 @@ void RoutingManager::SendRouterAdvertisement(const Ip6::Prefix *aNewOmrPrefixes,
memcpy(buffer + bufferLength, &rio, rio.GetSize()); memcpy(buffer + bufferLength, &rio, rio.GetSize());
bufferLength += rio.GetSize(); bufferLength += rio.GetSize();
otLogInfoBr("send OMR prefix %s in RIO (valid lifetime = %u seconds)", newOmrPrefix.ToString().AsCString(), otLogInfoBr("Send OMR prefix %s in RIO (valid lifetime = %u seconds)", newOmrPrefix.ToString().AsCString(),
kDefaultOmrPrefixLifetime); kDefaultOmrPrefixLifetime);
} }
@@ -764,14 +764,14 @@ void RoutingManager::SendRouterAdvertisement(const Ip6::Prefix *aNewOmrPrefixes,
if (error == kErrorNone) if (error == kErrorNone)
{ {
otLogInfoBr("sent Router Advertisement on interface %u", mInfraIfIndex); otLogInfoBr("Sent Router Advertisement on interface %u", mInfraIfIndex);
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
otDumpCertBr("[BR-CERT] direction=send | type=RA |", buffer, bufferLength); otDumpCertBr("[BR-CERT] direction=send | type=RA |", buffer, bufferLength);
#endif #endif
} }
else else
{ {
otLogWarnBr("failed to send Router Advertisement on interface %u: %s", mInfraIfIndex, ErrorToString(error)); otLogWarnBr("Failed to send Router Advertisement on interface %u: %s", mInfraIfIndex, ErrorToString(error));
} }
} }
} }
@@ -808,7 +808,7 @@ void RoutingManager::HandleRouterAdvertisementTimer(Timer &aTimer)
void RoutingManager::HandleRouterAdvertisementTimer(void) void RoutingManager::HandleRouterAdvertisementTimer(void)
{ {
otLogInfoBr("router advertisement timer triggered"); otLogInfoBr("Router advertisement timer triggered");
EvaluateRoutingPolicy(); EvaluateRoutingPolicy();
} }
@@ -820,7 +820,7 @@ void RoutingManager::HandleVicariousRouterSolicitTimer(Timer &aTimer)
void RoutingManager::HandleVicariousRouterSolicitTimer(void) void RoutingManager::HandleVicariousRouterSolicitTimer(void)
{ {
otLogInfoBr("vicarious router solicitation time out"); otLogInfoBr("Vicarious router solicitation time out");
for (uint8_t i = 0; i < mDiscoveredPrefixNum; ++i) for (uint8_t i = 0; i < mDiscoveredPrefixNum; ++i)
{ {
@@ -841,7 +841,7 @@ void RoutingManager::HandleRouterSolicitTimer(Timer &aTimer)
void RoutingManager::HandleRouterSolicitTimer(void) void RoutingManager::HandleRouterSolicitTimer(void)
{ {
otLogInfoBr("router solicitation times out"); otLogInfoBr("Router solicitation times out");
if (mRouterSolicitCount < kMaxRtrSolicitations) if (mRouterSolicitCount < kMaxRtrSolicitations)
{ {
@@ -853,17 +853,17 @@ void RoutingManager::HandleRouterSolicitTimer(void)
if (error == kErrorNone) if (error == kErrorNone)
{ {
otLogDebgBr("successfully sent %uth Router Solicitation", mRouterSolicitCount); otLogDebgBr("Successfully sent %uth Router Solicitation", mRouterSolicitCount);
} }
else else
{ {
otLogCritBr("failed to send %uth Router Solicitation: %s", mRouterSolicitCount, ErrorToString(error)); otLogCritBr("Failed to send %uth Router Solicitation: %s", mRouterSolicitCount, ErrorToString(error));
} }
nextSolicitationDelay = nextSolicitationDelay =
(mRouterSolicitCount == kMaxRtrSolicitations) ? kMaxRtrSolicitationDelay : kRtrSolicitationInterval; (mRouterSolicitCount == kMaxRtrSolicitations) ? kMaxRtrSolicitationDelay : kRtrSolicitationInterval;
otLogDebgBr("router solicitation timer scheduled in %u seconds", nextSolicitationDelay); otLogDebgBr("Router solicitation timer scheduled in %u seconds", nextSolicitationDelay);
mRouterSolicitTimer.Start(Time::SecToMsec(nextSolicitationDelay)); mRouterSolicitTimer.Start(Time::SecToMsec(nextSolicitationDelay));
} }
else else
@@ -898,7 +898,7 @@ void RoutingManager::HandleDiscoveredPrefixStaleTimer(Timer &aTimer)
void RoutingManager::HandleDiscoveredPrefixStaleTimer(void) void RoutingManager::HandleDiscoveredPrefixStaleTimer(void)
{ {
otLogInfoBr("all on-link prefixes are stale"); otLogInfoBr("All on-link prefixes are stale");
StartRouterSolicitationDelay(); StartRouterSolicitationDelay();
} }
@@ -928,7 +928,7 @@ void RoutingManager::HandleRouterSolicit(const Ip6::Address &aSrcAddress,
OT_UNUSED_VARIABLE(aBufferLength); OT_UNUSED_VARIABLE(aBufferLength);
VerifyOrExit(!mRouterSolicitTimer.IsRunning()); VerifyOrExit(!mRouterSolicitTimer.IsRunning());
otLogInfoBr("received Router Solicitation from %s on interface %u", aSrcAddress.ToString().AsCString(), otLogInfoBr("Received Router Solicitation from %s on interface %u", aSrcAddress.ToString().AsCString(),
mInfraIfIndex); mInfraIfIndex);
if (!mVicariousRouterSolicitTimer.IsRunning()) if (!mVicariousRouterSolicitTimer.IsRunning())
@@ -982,7 +982,7 @@ void RoutingManager::HandleRouterAdvertisement(const Ip6::Address &aSrcAddress,
VerifyOrExit(aBufferLength >= sizeof(RouterAdvMessage)); VerifyOrExit(aBufferLength >= sizeof(RouterAdvMessage));
otLogInfoBr("received Router Advertisement from %s on interface %u", aSrcAddress.ToString().AsCString(), otLogInfoBr("Received Router Advertisement from %s on interface %u", aSrcAddress.ToString().AsCString(),
mInfraIfIndex); mInfraIfIndex);
#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE #if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
otDumpCertBr("[BR-CERT] direction=recv | type=RA |", aBuffer, aBufferLength); otDumpCertBr("[BR-CERT] direction=recv | type=RA |", aBuffer, aBufferLength);
@@ -1047,13 +1047,13 @@ bool RoutingManager::UpdateDiscoveredPrefixes(const RouterAdv::PrefixInfoOption
if (!IsValidOnLinkPrefix(aPio, aManagedAddrConfig)) if (!IsValidOnLinkPrefix(aPio, aManagedAddrConfig))
{ {
otLogInfoBr("ignore invalid on-link prefix in PIO: %s", prefix.ToString().AsCString()); otLogInfoBr("Ignore invalid on-link prefix in PIO: %s", prefix.ToString().AsCString());
ExitNow(); ExitNow();
} }
VerifyOrExit(mAdvertisedOnLinkPrefix == nullptr || prefix != *mAdvertisedOnLinkPrefix); VerifyOrExit(mAdvertisedOnLinkPrefix == nullptr || prefix != *mAdvertisedOnLinkPrefix);
otLogInfoBr("discovered on-link prefix (%s, %u seconds) from interface %u", prefix.ToString().AsCString(), otLogInfoBr("Discovered on-link prefix (%s, %u seconds) from interface %u", prefix.ToString().AsCString(),
aPio.GetValidLifetime(), mInfraIfIndex); aPio.GetValidLifetime(), mInfraIfIndex);
if (aPio.GetValidLifetime() == 0) if (aPio.GetValidLifetime() == 0)
@@ -1076,7 +1076,7 @@ bool RoutingManager::UpdateDiscoveredPrefixes(const RouterAdv::RouteInfoOption &
if (!IsValidOmrPrefix(prefix)) if (!IsValidOmrPrefix(prefix))
{ {
otLogInfoBr("ignore invalid OMR prefix in RIO: %s", prefix.ToString().AsCString()); otLogInfoBr("Ignore invalid OMR prefix in RIO: %s", prefix.ToString().AsCString());
ExitNow(); ExitNow();
} }
@@ -1092,7 +1092,7 @@ bool RoutingManager::UpdateDiscoveredPrefixes(const RouterAdv::RouteInfoOption &
VerifyOrExit(!ContainsPrefix(prefix, mAdvertisedOmrPrefixes, mAdvertisedOmrPrefixNum)); VerifyOrExit(!ContainsPrefix(prefix, mAdvertisedOmrPrefixes, mAdvertisedOmrPrefixNum));
VerifyOrExit(!NetworkDataContainsOmrPrefix(prefix)); VerifyOrExit(!NetworkDataContainsOmrPrefix(prefix));
otLogInfoBr("discovered OMR prefix (%s, %u seconds) from interface %u", prefix.ToString().AsCString(), otLogInfoBr("Discovered OMR prefix (%s, %u seconds) from interface %u", prefix.ToString().AsCString(),
aRio.GetRouteLifetime(), mInfraIfIndex); aRio.GetRouteLifetime(), mInfraIfIndex);
if (aRio.GetRouteLifetime() == 0) if (aRio.GetRouteLifetime() == 0)
@@ -1218,7 +1218,7 @@ bool RoutingManager::AddDiscoveredPrefix(const Ip6::Prefix &aPrefix,
} }
else else
{ {
otLogWarnBr("discovered too many prefixes, ignore new prefix %s", aPrefix.ToString().AsCString()); otLogWarnBr("Discovered too many prefixes, ignore new prefix %s", aPrefix.ToString().AsCString());
ExitNow(); ExitNow();
} }
} }