diff options
| author | Christian Hopps <chopps@labn.net> | 2025-03-05 01:19:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-05 01:19:05 -0500 |
| commit | 5cf533ba7498df5324aa0e22fd1916341d854db5 (patch) | |
| tree | 5e7d489ae4fcb255930ca8398182de532f60df92 | |
| parent | e47a0557e5dfaebf2e327355c09fce4abb3ec7de (diff) | |
| parent | ad04988ad428867db06433ff9ed3234afd14ee5c (diff) | |
Merge pull request #18268 from donaldsharp/yang_correct_vrf_issue
lib: Correct handling of /frr-vrf:lib/vrf/state/active
| -rw-r--r-- | lib/vrf.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1044,7 +1044,7 @@ static const void *lib_vrf_lookup_next(struct nb_cb_lookup_entry_args *args) } /* - * XPath: /frr-vrf:lib/vrf/id + * XPath: /frr-vrf:lib/vrf/state/id */ static struct yang_data * lib_vrf_state_id_get_elem(struct nb_cb_get_elem_args *args) @@ -1055,17 +1055,14 @@ lib_vrf_state_id_get_elem(struct nb_cb_get_elem_args *args) } /* - * XPath: /frr-vrf:lib/vrf/active + * XPath: /frr-vrf:lib/vrf/state/active */ static struct yang_data * lib_vrf_state_active_get_elem(struct nb_cb_get_elem_args *args) { struct vrf *vrfp = (struct vrf *)args->list_entry; - if (vrfp->status == VRF_ACTIVE) - return yang_data_new_bool(args->xpath, true); - - return NULL; + return yang_data_new_bool(args->xpath, vrfp->status == VRF_ACTIVE ? true : false); } /* clang-format off */ |
