mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 02:30:52 +00:00
Merge pull request #5616 from sworleys/NHG-Fix-Recurse-to-Group
zebra: just set nexthop member in handle_recursive_depend()
This commit is contained in:
commit
a67b69c024
@ -250,8 +250,7 @@ static void _nexthop_add_sorted(struct nexthop **head,
|
|||||||
{
|
{
|
||||||
struct nexthop *position, *prev;
|
struct nexthop *position, *prev;
|
||||||
|
|
||||||
/* Ensure this gets set */
|
assert(!nexthop->next);
|
||||||
nexthop->next = NULL;
|
|
||||||
|
|
||||||
for (position = *head, prev = NULL; position;
|
for (position = *head, prev = NULL; position;
|
||||||
prev = position, position = position->next) {
|
prev = position, position = position->next) {
|
||||||
@ -281,6 +280,8 @@ void nexthop_group_add_sorted(struct nexthop_group *nhg,
|
|||||||
{
|
{
|
||||||
struct nexthop *tail;
|
struct nexthop *tail;
|
||||||
|
|
||||||
|
assert(!nexthop->next);
|
||||||
|
|
||||||
/* Try to just append to the end first;
|
/* Try to just append to the end first;
|
||||||
* trust the list is already sorted
|
* trust the list is already sorted
|
||||||
*/
|
*/
|
||||||
|
@ -478,7 +478,7 @@ static void handle_recursive_depend(struct nhg_connected_tree_head *nhg_depends,
|
|||||||
struct nhg_hash_entry *depend = NULL;
|
struct nhg_hash_entry *depend = NULL;
|
||||||
struct nexthop_group resolved_ng = {};
|
struct nexthop_group resolved_ng = {};
|
||||||
|
|
||||||
nexthop_group_add_sorted(&resolved_ng, nh);
|
resolved_ng.nexthop = nh;
|
||||||
|
|
||||||
depend = zebra_nhg_rib_find(0, &resolved_ng, afi);
|
depend = zebra_nhg_rib_find(0, &resolved_ng, afi);
|
||||||
depends_add(nhg_depends, depend);
|
depends_add(nhg_depends, depend);
|
||||||
|
Loading…
Reference in New Issue
Block a user