mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-30 06:44:20 +00:00
Merge pull request #13755 from LabNConsulting/ziemba/zebra-dplane-priority
zebra: bugfix dplane priority sorting
This commit is contained in:
commit
f89d090230
@ -5546,7 +5546,7 @@ int dplane_provider_register(const char *name,
|
|||||||
struct zebra_dplane_provider **prov_p)
|
struct zebra_dplane_provider **prov_p)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct zebra_dplane_provider *p = NULL, *last;
|
struct zebra_dplane_provider *p = NULL, *last, *prev = NULL;
|
||||||
|
|
||||||
/* Validate */
|
/* Validate */
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
@ -5589,10 +5589,11 @@ int dplane_provider_register(const char *name,
|
|||||||
frr_each (dplane_prov_list, &zdplane_info.dg_providers, last) {
|
frr_each (dplane_prov_list, &zdplane_info.dg_providers, last) {
|
||||||
if (last->dp_priority > p->dp_priority)
|
if (last->dp_priority > p->dp_priority)
|
||||||
break;
|
break;
|
||||||
|
prev = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last)
|
if (last)
|
||||||
dplane_prov_list_add_after(&zdplane_info.dg_providers, last, p);
|
dplane_prov_list_add_after(&zdplane_info.dg_providers, prev, p);
|
||||||
else
|
else
|
||||||
dplane_prov_list_add_tail(&zdplane_info.dg_providers, p);
|
dplane_prov_list_add_tail(&zdplane_info.dg_providers, p);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user