[routing-manager] ensure to clear the prefix for default route (#7948)

This commit fixes the method setting the prefix table entry from
RA header as a default route by clearing `mPrefix` variable so
to set it as `::/0`.
This commit is contained in:
Abtin Keshavarzian
2022-07-26 20:52:53 -07:00
committed by GitHub
parent 32ac6ddfad
commit 12d35f3dfa
@@ -1906,6 +1906,7 @@ exit:
void RoutingManager::DiscoveredPrefixTable::Entry::InitFrom(const Ip6::Nd::RouterAdvertMessage::Header &aRaHeader)
{
mPrefix.Clear();
mType = kTypeRoute;
mValidLifetime = aRaHeader.GetRouterLifetime();
mShared.mRoutePreference = aRaHeader.GetDefaultRouterPreference();