* Fixed: [RESTConf GET for a specific list instance retrieves data from other submodules that have same list name and key value #244](https://github.com/clicon/clixon/issues/244)
* Fixed: Double clixon error messages in yang2cli code * Sanity checks for submodule belongs-to
This commit is contained in:
parent
fe0541959f
commit
1925ac68cd
7 changed files with 126 additions and 19 deletions
|
|
@ -1414,6 +1414,7 @@ ys_real_module(yang_stmt *ys,
|
|||
{
|
||||
int retval = -1;
|
||||
yang_stmt *ym = NULL;
|
||||
yang_stmt *ysubm;
|
||||
yang_stmt *yb;
|
||||
char *name;
|
||||
yang_stmt *yspec;
|
||||
|
|
@ -1433,8 +1434,12 @@ ys_real_module(yang_stmt *ys,
|
|||
clicon_err(OE_YANG, ENOENT, "Belongs-to statement of submodule %s has no argument", yang_argument_get(ym)); /* shouldnt happen */
|
||||
goto done;
|
||||
}
|
||||
if ((ym = yang_find_module_by_name(yspec, name)) == NULL)
|
||||
if ((ysubm = yang_find_module_by_name(yspec, name)) == NULL){
|
||||
clicon_err(OE_YANG, ENOENT, "submodule %s references non-existent module %s in its belongs-to statement",
|
||||
yang_argument_get(ym), name);
|
||||
goto done;
|
||||
}
|
||||
ym = ysubm;
|
||||
}
|
||||
}
|
||||
*ymod = ym;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue