mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
lib: fix crash when iterating over nb operational data
Example: ``` show yang operational-data /frr-routing:routing/control-plane-protocols/control-plane-protocol[type='frr-staticd:staticd'][name='staticd'][vrf='default'] staticd ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
30b3fb20d4
commit
baa1d4aff6
@ -1817,6 +1817,16 @@ int nb_oper_data_iterate(const char *xpath, struct yang_translator *translator,
|
|||||||
|
|
||||||
/* Find the list entry pointer. */
|
/* Find the list entry pointer. */
|
||||||
nn = dn->schema->priv;
|
nn = dn->schema->priv;
|
||||||
|
if (!nn->cbs.lookup_entry) {
|
||||||
|
flog_warn(
|
||||||
|
EC_LIB_NB_OPERATIONAL_DATA,
|
||||||
|
"%s: data path doesn't support iteration over operational data: %s",
|
||||||
|
__func__, xpath);
|
||||||
|
list_delete(&list_dnodes);
|
||||||
|
yang_dnode_free(dnode);
|
||||||
|
return NB_ERR;
|
||||||
|
}
|
||||||
|
|
||||||
list_entry =
|
list_entry =
|
||||||
nb_callback_lookup_entry(nn, list_entry, &list_keys);
|
nb_callback_lookup_entry(nn, list_entry, &list_keys);
|
||||||
if (list_entry == NULL) {
|
if (list_entry == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user