mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
lib: Create VRF if needed
When creating a control plane protocol through NB, create the vrf
if needed instead of only looking up and asserting if it doesn't
exist yet.
Fixes 18429.
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
(cherry picked from commit b6ae01f907
)
This commit is contained in:
parent
98edc91cc3
commit
72e6303944
|
@ -47,7 +47,7 @@ int routing_control_plane_protocols_control_plane_protocol_create(
|
|||
*/
|
||||
if (nb_node_has_dependency(args->dnode->schema->priv)) {
|
||||
vrfname = yang_dnode_get_string(args->dnode, "vrf");
|
||||
vrf = vrf_lookup_by_name(vrfname);
|
||||
vrf = vrf_get(VRF_UNKNOWN, vrfname);
|
||||
assert(vrf);
|
||||
nb_running_set_entry(args->dnode, vrf);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue