From 818a774bcf2cc655ff3d400f50c5b50d96d3e771 Mon Sep 17 00:00:00 2001 From: kangping Date: Tue, 16 Mar 2021 23:37:02 +0800 Subject: [PATCH] [border-router] send at least one router solicitation (#6280) --- src/core/border_router/routing_manager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/border_router/routing_manager.cpp b/src/core/border_router/routing_manager.cpp index 1a09bbabb..a31ca0500 100644 --- a/src/core/border_router/routing_manager.cpp +++ b/src/core/border_router/routing_manager.cpp @@ -1145,12 +1145,18 @@ bool RoutingManager::AddDiscoveredPrefix(const Ip6::Prefix &aPrefix, SuccessOrExit(AddExternalRoute(aPrefix, aRoutePreference)); - if (aIsOnLinkPrefix) + if (aIsOnLinkPrefix && mRouterSolicitCount > 0) { // Stop Router Solicitation if we discovered a valid on-link prefix. // Otherwise, we wait till the Router Solicitation process times out. // So the maximum delay before the Border Router starts advertising - // its own on-link prefix is 9 (4 + 4 + 1) seconds. + // its own on-link prefix is 10 seconds = RS_DELAY (1) + RS_INTERNAL (4) + // + RS_INTERVAL (4) + RS_DELAY (1). + // + // Always send at least one RS message so that all BRs will respond. + // Consider that there are multiple BRs on the infra link, we may not learn + // RIOs of other BRs if the router discovery process is stopped immediately + // before sending any RS messages because of receiving an unsolicited RA. mRouterSolicitTimer.Stop(); }