[routing-manager] track origin of received RA messages (#10229)

This commit adds `RouterAdvOrigin` enumeration to track the origin of
a received RA message, whether it is from another router on the
infrastructure, or self-generated by either the `RoutingManager`
module or another software entity running on the device.

This is used to exclude prefixes from self-generated `RoutingManager`
RAs in the prefix table and simplifies learning and adopting of RA
headers from other software entities on the same device.

The origin is now logged when a new RA is received for improved
debugging.

This commit also updates `test_routing_manager` to pass back any sent
RA messages to the OT stack. This validates the mechanism for
identifying self-generated RA messages.
This commit is contained in:
Abtin Keshavarzian
2024-05-14 11:04:56 -07:00
committed by GitHub
parent e47973a753
commit e27885ecb4
3 changed files with 59 additions and 26 deletions
+1
View File
@@ -317,6 +317,7 @@ otError otPlatInfraIfSendIcmp6Nd(uint32_t aInfraIfIndex,
Log(" Router Advertisement message");
LogRouterAdvert(packet);
ValidateRouterAdvert(packet);
otPlatInfraIfRecvIcmp6Nd(sInstance, kInfraIfIndex, &sInfraIfAddress, aBuffer, aBufferLength);
break;
case Ip6::Icmp::Header::kTypeNeighborSolicit: