Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zebra: return fully-resolved route to NHT clients
When a nexthop being tracked is resolved to a recursive route at the first level of recursion, several parameters (such as the prefix, metric and protocol type) of the recursive route are sent to clients, along with the fully-resolved nexthop. This creates an inconsistency or de-coupling between the route and its nexthop, that is, the fully-resolved nexthop would belong to a different route that is non-recursive. Thus the update message to clients would contain parameters like prefix, metric and protocl type from a recursive route, and the nexthop from a non-recursive route. In particular, the protocol type and the metric fields in the update message no longer reflect the property of the fully-resolved nexthop in the meesage. It would be diffcult for a client to make sense of these parameters. As an example, when the nexthop being tracked is resolved to a BGP route, instead of further resolving to an IGP route and getting its metric, the MED value of the BGP route would be taken as the metric and given to BGP for bestpath calculation, resulting in incorrect route selection. The fix is to always calculate and return the fully-resolved route to clients so that the route parameters like protocol type, distance, metric and the resolved nexthops are consistent. When a nht nexthop is resolved recursively, associate the nht nexthop with each of the recursive routes so that the nht entry is re-evaluated when there is a change to any of the dependent routes. Signed-off-by: Enke Chen <[email protected]>
- Loading branch information