HomeFreeBSD

routing: add rib_<add|del>_route_px() functions operating with nexthops.

Description

routing: add rib_<add|del>_route_px() functions operating with nexthops.

This change adds public KPI to work with routes using pre-created
nexthops, instead of using data from addrinfo structures. These
functions will be later used for adding/deleting kernel-originated
routes and upcoming netlink protocol.

As a part of providing this KPI, low-level route addition code has been
reworked to provide more control over route creation or change.
Specifically, a number of operation flags
(RTM_F_<CREATE|EXCL|REPLACE|APPEND>) have been added, defining the
desired behaviour the the route already exists (or not exists). This
change required some changes in the multipath addition code, resulting
in moving this code to route_ctl.c, rendering mpath_ctl.c empty.

Differential Revision: https://reviews.freebsd.org/D36073
MFC after: 1 month

(cherry picked from commit 2ce553854cbd04595d99e1cfbc9c12a87dde7906)

Details

Provenance
melifaroAuthored on Aug 4 2022, 2:55 PM
Differential Revision
D36073: routing: add rib_<add|del>_route_px() functions operating with nexthops.
Parents
rG844e12bd8c6d: routing: split nexthop creation and rtentry creation.
Branches
Unknown
Tags
Unknown