diff options
| author | Christian Hopps <chopps@gmail.com> | 2021-05-04 10:41:58 -0400 | 
|---|---|---|
| committer | Christian Hopps <chopps@labn.net> | 2021-05-13 16:24:48 -0400 | 
| commit | 3bb513c399c2e7c8dd597b7399dd7c0f064842d0 (patch) | |
| tree | 14f3e677c49fce272946788f8a8b8f3f8a3e26b5 /bfdd/bfd.c | |
| parent | 17daea8a184c0e85b9788329f3c808ceab916ad5 (diff) | |
lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang
staticd init load time of 10k routes now 6s vs ly1 time of 150s
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'bfdd/bfd.c')
| -rw-r--r-- | bfdd/bfd.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 18f331e201..c66fccb853 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -2195,13 +2195,13 @@ void bfd_session_update_vrf_name(struct bfd_session *bs, struct vrf *vrf)  		snprintf(xpath + slen, sizeof(xpath) - slen, "[vrf='%s']/vrf",  			 bs->key.vrfname); -		bfd_dnode = yang_dnode_get(running_config->dnode, xpath, -					   bs->key.vrfname); +		bfd_dnode = yang_dnode_getf(running_config->dnode, xpath, +					    bs->key.vrfname);  		if (bfd_dnode) { -			yang_dnode_get_path(bfd_dnode->parent, oldpath, +			yang_dnode_get_path(lyd_parent(bfd_dnode), oldpath,  					    sizeof(oldpath));  			yang_dnode_change_leaf(bfd_dnode, vrf->name); -			yang_dnode_get_path(bfd_dnode->parent, newpath, +			yang_dnode_get_path(lyd_parent(bfd_dnode), newpath,  					    sizeof(newpath));  			nb_running_move_tree(oldpath, newpath);  			running_config->version++;  | 
