HomeFreeBSD

Add rib_lookup_info() to provide API for retrieving individual route

Description

Add rib_lookup_info() to provide API for retrieving individual route

entries data in unified format.

There are control plane functions that require information other than

just next-hop data (e.g. individual rtentry fields like flags or
prefix/mask). Given that the goal is to avoid rte reference/refcounting,
re-use rt_addrinfo structure to store most rte fields. If caller wants
to retrieve key/mask or gateway (which are sockaddrs and are allocated
separately), it needs to provide sufficient-sized sockaddrs structures
w/ ther pointers saved in passed rt_addrinfo.

Convert:

  • lltable new records checks (in_lltable_rtcheck(), nd6_is_new_addr_neighbor().
  • rtsock pre-add/change route check.
  • IPv6 NS ND-proxy check (RADIX_MPATH code was eliminated because
    1. we don't support RTF_ANNOUNCE ND-proxy for networks and there should not be multiple host routes for such hosts 2) if we have multiple routes we should inspect them (which is not done). 3) the entire idea of abusing KRT as storage for ND proxy seems odd. Userland programs should be used for that purpose).

Details

Provenance
melifaroAuthored on
Parents
rS293158: MFC r292949:
Branches
Unknown
Tags
Unknown