HomeFreeBSD

routing: simplify decompose_change_notification().

Description

routing: simplify decompose_change_notification().

The function's goal is to compare old/new nhop/nexthop group for the route
and decompose it into the series of RTM_ADD/RTM_DELETE single-nhop
events, calling specified callback for each event.
Simplify it by properly leveraging the fact that both old/new groups
are sorted nhop-# ascending.

Tested by: Claudio Jeker<claudio.jeker@klarasystems.com>
Differential Revision: https://reviews.freebsd.org/D35598
MFC after: 2 weeks

(cherry picked from commit 8010b7a78a3af66dda1c74373499794af9ffd35f)

Details

Provenance
melifaroAuthored on Jun 27 2022, 5:29 PM
Differential Revision
D35598: routing: simplify decompose_change_notification().
Parents
rGe8508a64b7d2: routing: actually sort nexthops in nhgs by their index
Branches
Unknown
Tags
Unknown