diff options
author | Mark Stapp <mjs@voltanet.io> | 2020-05-27 18:52:07 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-07-07 19:14:01 +0200 |
commit | 9959f1dabac4147ce2c34936df61c32c5f2d92ed (patch) | |
tree | 73282396a0d5d5b6386988dfe610cfc8fdb7456d /zebra/zebra_nhg.c | |
parent | sharpd: be explicit if nht is uninstalled (diff) | |
download | frr-9959f1dabac4147ce2c34936df61c32c5f2d92ed.tar.xz frr-9959f1dabac4147ce2c34936df61c32c5f2d92ed.zip |
zebra: improve logic handling backup nexthop installation
When handling a fib notification event that involves a route
with backup nexthops, be clearer about representing the
installed state of the backups: any installed backup will be
on a dedicated route_entry list.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_nhg.c')
-rw-r--r-- | zebra/zebra_nhg.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 258709ad9..f5e4a4e79 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1961,9 +1961,13 @@ static int nexthop_active(afi_t afi, struct route_entry *re, resolved = 1; } - /* Examine installed backup nexthops, if any */ - nhg = zebra_nhg_get_backup_nhg(match->nhe); - if (nhg == NULL) + /* Examine installed backup nexthops, if any. There + * are only installed backups *if* there is a + * dedicated fib list. + */ + nhg = rib_get_fib_backup_nhg(match); + if (nhg == NULL || + nhg == zebra_nhg_get_backup_nhg(match->nhe)) goto done_with_match; for (ALL_NEXTHOPS_PTR(nhg, newhop)) { |