summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2024-06-20 18:02:26 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2024-06-20 18:19:43 +0200
commitd4390fc21795b09b84a6b95b1f8fa1ac2b3dcda9 (patch)
tree7a40e3732fb314142bf091c7443202eefcea9fa9
parent34a6e223fb2a1ad479aa36d997850924baa137a9 (diff)
bgpd: fix do not use api.backup_nexthop in ZAPI message
The backup_nexthop entry list has been populated by mistake, and should not. Fix this by reverting the introduced behavior. Fixes: 237ebf8d4503 ("bgpd: rework bgp_zebra_announce() function, separate nexthop handling") Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
-rw-r--r--bgpd/bgp_zebra.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 73543f9fb4..7f91e3149e 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1331,10 +1331,7 @@ static void bgp_zebra_announce_parse_nexthop(
&nh_weight))
continue;
}
- if (CHECK_FLAG(info->flags, BGP_PATH_SELECTED))
- api_nh = &api->nexthops[*valid_nh_count];
- else
- api_nh = &api->backup_nexthops[*valid_nh_count];
+ api_nh = &api->nexthops[*valid_nh_count];
api_nh->srte_color = bgp_attr_get_color(info->attr);