mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 09:46:54 +00:00
Merge pull request #14147 from idryzhov/static-fix-nexthop-vrf
staticd: fix comparison of nexthop-vrf
This commit is contained in:
commit
a593a319f5
@ -1374,6 +1374,7 @@ int static_nexthop_cli_cmp(const struct lyd_node *dnode1,
|
|||||||
{
|
{
|
||||||
enum static_nh_type nh_type1, nh_type2;
|
enum static_nh_type nh_type1, nh_type2;
|
||||||
struct prefix prefix1, prefix2;
|
struct prefix prefix1, prefix2;
|
||||||
|
const char *vrf1, *vrf2;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
nh_type1 = yang_dnode_get_enum(dnode1, "./nh-type");
|
nh_type1 = yang_dnode_get_enum(dnode1, "./nh-type");
|
||||||
@ -1413,8 +1414,14 @@ int static_nexthop_cli_cmp(const struct lyd_node *dnode1,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return if_cmp_name_func(yang_dnode_get_string(dnode1, "./vrf"),
|
vrf1 = yang_dnode_get_string(dnode1, "./vrf");
|
||||||
yang_dnode_get_string(dnode2, "./vrf"));
|
if (strmatch(vrf1, "default"))
|
||||||
|
vrf1 = "";
|
||||||
|
vrf2 = yang_dnode_get_string(dnode2, "./vrf");
|
||||||
|
if (strmatch(vrf2, "default"))
|
||||||
|
vrf2 = "";
|
||||||
|
|
||||||
|
return if_cmp_name_func(vrf1, vrf2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int static_route_list_cli_cmp(const struct lyd_node *dnode1,
|
int static_route_list_cli_cmp(const struct lyd_node *dnode1,
|
||||||
|
Loading…
Reference in New Issue
Block a user