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

Details

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