HomeFreeBSD

routing: add abitity to set the protocol that installed route/nexthop.

Description

routing: add abitity to set the protocol that installed route/nexthop.

Routing daemons such as bird need to know if they install certain route
so they can clean it up on startup, as a form of achieving consistent
state during the crash recovery.
Currently they use combination of routing flags (RTF_PROTO1) to detect
these routes when interacting via route(4) rtsock protocol.
Netlink protocol has a special "rtm_protocol" field that is filled and
checked by the route originator. To prepare for the upcoming netlink
introduction, add ability to record origing to both nexthops and
nexthop groups via <nhop|nhgrp>_<get|set>_origin() KPI. The actual
calls will be used in the followup commits.

MFC after: 1 month

(cherry picked from commit 000250be0d2dc7a241f1c9b9c27d941af781ca46)

Details

Provenance
melifaroAuthored on Sep 8 2022, 9:05 AM
Parents
rG47d08873b001: netinet6: call lle_event eventhandler after updating state
Branches
Unknown
Tags
Unknown