From 3b636b51f079a5ed5bb40eae71e60f1e461ca87a Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Fri, 11 Aug 2023 17:12:11 +0200 Subject: [PATCH] Fixed: [Openconfig configuration on Juniper MX does not work](https://github.com/clicon/clixon-controller/issues/20) --- CHANGELOG.md | 1 + lib/src/clixon_yang_parse_lib.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 905d2984..c04345b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ Expected: October 2023 ### Corrected Bugs +* Fixed: [Openconfig configuration on Juniper MX does not work](https://github.com/clicon/clixon-controller/issues/20) * Fixed: CLI output pipes: Add CLICON_PIPETREE to any cli files, not just the first ## 6.3.0 diff --git a/lib/src/clixon_yang_parse_lib.c b/lib/src/clixon_yang_parse_lib.c index 90ae7e4e..6261a233 100644 --- a/lib/src/clixon_yang_parse_lib.c +++ b/lib/src/clixon_yang_parse_lib.c @@ -179,8 +179,12 @@ ys_grouping_resolve(yang_stmt *yuses, else { ys = yuses; /* Check upwards in hierarchy for matching groupings */ while (1){ - if ((yp = yang_parent_get(ys)) == NULL) - break; + if (ys->ys_mymodule){ + yp = ys->ys_mymodule; + } + else + if ((yp = yang_parent_get(ys)) == NULL) + break; if ((keyw = yang_keyword_get(yp)) == Y_SPEC) break; else if (keyw == Y_MODULE || keyw == Y_SUBMODULE){ /* Try submodules */