diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9dabbec..f4957ccf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -80,6 +80,7 @@ Users may have to change how they access the system
### Corrected Bugs
+* Fixed: unknown nodes (for extenstions) did not work when placed directly under a grouping clause
* Fixed: [Behaviour of Empty LIST Input in RESTCONF JSON #166](https://github.com/clicon/clixon/issues/166)
* Netconf split lines input (input fragments) fixed
* Netconf input split on several lines, eg using stdin: "\nfoo]]>]]>" could under some circumstances be split so that only "]]>]]>" be properly processed. This could also happen to a socket receiving a sub-string and then after a delay receive the rest.
diff --git a/lib/src/clixon_yang_parse_lib.c b/lib/src/clixon_yang_parse_lib.c
index 7f975b8c..3629c81e 100644
--- a/lib/src/clixon_yang_parse_lib.c
+++ b/lib/src/clixon_yang_parse_lib.c
@@ -530,13 +530,13 @@ yang_expand_grouping(yang_stmt *yn)
if ((ygrouping2 = ys_dup(ygrouping)) == NULL)
goto done;
- /* Only replace data/schemanodes:
+ /* Only replace data/schemanodes and unknowns:
* Compute the number of such nodes, and extend the child vector with that below
*/
glen = 0;
yg = NULL;
while ((yg = yn_each(ygrouping2, yg)) != NULL) {
- if (yang_schemanode(yg))
+ if (yang_schemanode(yg) || yang_keyword_get(yg) == Y_UNKNOWN)
glen++;
}
/*
@@ -584,7 +584,7 @@ yang_expand_grouping(yang_stmt *yn)
for (j=0; jys_stmt[j]; /* Child of refined copy */
/* Only replace data/schemanodes */
- if (!yang_schemanode(yg)){
+ if (!yang_schemanode(yg) && yang_keyword_get(yg) != Y_UNKNOWN){
ys_free(yg);
continue;
}