]> 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)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 21 Jun 2024 06:44:44 +0000 (06:44 +0000)
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>
(cherry picked from commit d4390fc21795b09b84a6b95b1f8fa1ac2b3dcda9)

bgpd/bgp_zebra.c

index fe29662e280f6a2e183a7a30ecc6a7491efa6d0b..6fa98c68ee82c4ebe6c7d85373284fd63fcc0c2b 100644 (file)
@@ -1286,10 +1286,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];
 
                if (CHECK_FLAG(info->attr->flag,
                               ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR)))