]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add rib_lookup_info() to provide API for retrieving individual route
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 4 Jan 2016 15:03:20 +0000 (15:03 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 4 Jan 2016 15:03:20 +0000 (15:03 +0000)
commit9a1b64d5a0224188da8a84a7803ab12cb07c694a
tree97043b0fe5b60ef63af4661bdd61f9c954d3bf5b
parentdb61e6ef45353e2cd30bcdacad3cfaf635cba591
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).
sys/net/route.c
sys/net/route.h
sys/net/rtsock.c
sys/netinet/in.c
sys/netinet6/nd6.c
sys/netinet6/nd6_nbr.c