extensions CHANGE use the validate callback of extension plugin
The validate callback was not used so far. It is now used for validating
data nodes by extension instances placed in the nodes themselves or in
their types (compiled types, so not matter where the extension came
from, the node's type itself or a used typedef's type).
diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c
index 76b890a..7272725 100644
--- a/src/tree_data_helpers.c
+++ b/src/tree_data_helpers.c
@@ -34,6 +34,7 @@
#include "tree_data_internal.h"
#include "tree_edit.h"
#include "tree_schema.h"
+#include "validation.h"
#include "xml.h"
struct lyd_node *
@@ -222,7 +223,8 @@
}
void
-lyd_parse_set_data_flags(struct lyd_node *node, struct ly_set *when_check, struct lyd_meta **meta, uint32_t options)
+lyd_parse_set_data_flags(struct lyd_node *node, struct ly_set *when_check, struct ly_set *exts_check, struct lyd_meta **meta,
+ uint32_t options)
{
struct lyd_meta *meta2, *prev_meta = NULL;
@@ -232,6 +234,7 @@
LY_CHECK_RET(ly_set_add(when_check, node, 1, NULL), );
}
}
+ LY_CHECK_RET(lysc_node_ext_tovalidate(exts_check, node), );
LY_LIST_FOR(*meta, meta2) {
if (!strcmp(meta2->name, "default") && !strcmp(meta2->annotation->module->name, "ietf-netconf-with-defaults") &&