]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
routing: simplify decompose_change_notification().
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 27 Jun 2022 17:29:03 +0000 (17:29 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Fri, 13 Jan 2023 21:18:25 +0000 (21:18 +0000)
commit884b1fa66bc16e7667efe492a7e1cc18c53c23e0
tree81e930cc00a5641de4c1026bf40e92372ce620fd
parente8508a64b7d25cd189636fe5a7eecabe27f6c6a9
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)
sys/net/route/route_helpers.c