Skip to content

Commit d40d1b0

Browse files
committed
server config BUGFIX don't configure deleted endpoint
An endpoint may fail to be created if is after a deleted endpoint depending on the order in the list of endpoints. This patch don't try to create deleted endpoints. Skip the endpoint with the 'delete' yang operation. This fixes this error message: > Endpoint "<endpoint name>" was not found. > Applying ietf-netconf-server configuration failed.
1 parent b79e9a4 commit d40d1b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/server_config.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4314,6 +4314,12 @@ nc_server_config_listen_all_endpoints(const struct lyd_node *node)
43144314
if (n) {
43154315
/* go over all the endpoints */
43164316
LY_LIST_FOR(lyd_child(n), iter) {
4317+
struct lyd_meta *m;
4318+
if ((m = lyd_find_meta(iter->meta, NULL, "yang:operation"))) {
4319+
if (!strcmp(lyd_get_meta_value(m), "delete")) {
4320+
continue;
4321+
}
4322+
}
43174323
/* get the endpoint and bind structs from the node */
43184324
NC_CHECK_RET(nc_server_config_get_endpt(iter, &endpt, &bind));
43194325

0 commit comments

Comments
 (0)