schema parser BUGFIX inheriting config flags in augment
Do not inherit config flags in augment without target. When the target
is resolved, the config flags are resolved and in that time we also have
to check that possible leafrefs inside the augment does not brake the rule
of not refering config false nodes from config true leafref.
diff --git a/src/parser_yang.c b/src/parser_yang.c
index 81289e7..d52efaf 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -2611,8 +2611,8 @@
if (config_opt == CONFIG_INHERIT_ENABLE) {
if (!(node->flags & LYS_CONFIG_MASK)) {
/* get config flag from parent */
- if (node->parent && (node->parent->flags & LYS_CONFIG_R)) {
- node->flags |= LYS_CONFIG_R;
+ if (node->parent) {
+ node->flags |= node->parent->flags & LYS_CONFIG_MASK;
} else {
/* default config is true */
node->flags |= LYS_CONFIG_W;