diff options
| author | Nathan Bahr <nbahr@atcorp.com> | 2025-03-19 16:07:37 +0000 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2025-03-19 19:38:34 +0000 |
| commit | 72e6303944d6706043c89c62858cb425dcd01f8d (patch) | |
| tree | d9a9d342b3c79bf087053a4f00bb29a9925ad20a | |
| parent | 98edc91cc316a2134ebf5c6d4ac3365aa1068c6b (diff) | |
lib: Create VRF if neededmergify/bp/stable/10.2/pr-18430
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 b6ae01f907c071be6cd197df0f3ca6fe9baa631a)
| -rw-r--r-- | lib/routing_nb_config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/routing_nb_config.c b/lib/routing_nb_config.c index d532279a22..3f0b661d02 100644 --- a/lib/routing_nb_config.c +++ b/lib/routing_nb_config.c @@ -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); } |
