HomeFreeBSD

routing: extend nhop(9) kpi

Description

routing: extend nhop(9) kpi

  • add nhop_get_unlinked() used to prepare referenced but not linked nexthop, that can later be used as a clone source.
  • add nhop_check_gateway() to check for allowed address family combinations between the rib family and neighbor family (useful for 4o6 or direct routes)
  • add nhop_set_upper_family() to allow copying IPv6 nexthops to IPv4 rib.
  • add rt_get_rnd() wrapper, returning both nexthop/group and its weight attached to the rtentry.
  • Add CHT_SLIST_FOREACH_SAFE(), allowing to delete items during iteration.

MFC after: 2 weeks

(cherry picked from commit fe05d1dd0fdf7c8d09b9aad4ff74c44b7c90db80)

Details

Provenance
melifaroAuthored on Aug 29 2022, 2:38 PM
Parents
rGb9a4237c5fce: routing: fix rib_add_route_px()
Branches
Unknown
Tags
Unknown