]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix do not use api.backup_nexthop in ZAPI message
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 20 Jun 2024 16:02:26 +0000 (18:02 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 20 Jun 2024 16:19:43 +0000 (18:19 +0200)
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>
bgpd/bgp_zebra.c

index 73543f9fb44cbb7daf84ccb2fb8e1fc0b51b01d5..7f91e3149e0bfabcd6902a125f8fea7f9f0c96fb 100644 (file)
@@ -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);