HomeFreeBSD

routing: remove info argument from add/change_route_nhop().

Description

routing: remove info argument from add/change_route_nhop().

Currently, rt_addrinfo(info) serves as a main "transport" moving
state between various functions inside the routing subsystem.
As all of the fields are filled in directly by the customers, it
is problematic to maintain consistency, resulting in repeated checks
inside many functions. Additionally, there are multiple ways of
specifying the same value (RTAX_IFP vs rti_ifp / rti_ifa) and so on.
With the upcoming nhop(9) kpi it is possible to store all of the
required state in the nexthops in the consistent fashion, reducing the
need to use "info" in the KPI calls.
Finally, rt_addrinfo structure format was derived from the rtsock wire
format, which is different from other kernel routing users or netlink.

This cleanup simplifies upcoming nhop(9) kpi and netlink introduction.

Reviewed by: zlei.huang@gmail.com
Differential Revision: https://reviews.freebsd.org/D35972
MFC after: 2 weeks

(cherry picked from commit 29029b06a6f7fd51c34c9db88cc98a6653ee5046)

Details

Provenance
melifaroAuthored on Jul 28 2022, 1:41 PM
Differential Revision
D35972: routing: remove info argument from add/change_route_nhop().
Parents
rG81a72d997e22: tcp: virtualise net.inet.tcp.msl sysctl.
Branches
Unknown
Tags
Unknown