Fixed: Accepted added subtrees containing lists with duplicate keys
This commit is contained in:
parent
8ae647c32b
commit
469cbe0d64
2 changed files with 12 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ Users may have to change how they access the system
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
|
||||||
|
* Fixed: Accepted added subtrees containing lists with duplicate keys.
|
||||||
* Fixed: [default state data returned with get-config](https://github.com/clicon/clixon/issues/140)
|
* Fixed: [default state data returned with get-config](https://github.com/clicon/clixon/issues/140)
|
||||||
* Generalized default code for both config and state
|
* Generalized default code for both config and state
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -846,7 +846,15 @@ check_list_unique_minmax(cxobj *xt,
|
||||||
}
|
}
|
||||||
if (keyw != Y_LIST)
|
if (keyw != Y_LIST)
|
||||||
continue;
|
continue;
|
||||||
/* Here only lists. test unique constraints */
|
/* Here new (first element) of lists only
|
||||||
|
* First check unique keys
|
||||||
|
*/
|
||||||
|
if ((ret = check_unique_list(x, xt, y, y, xret)) < 0)
|
||||||
|
goto done;
|
||||||
|
if (ret == 0)
|
||||||
|
goto fail;
|
||||||
|
/* Check if there is a unique constraint on the list
|
||||||
|
*/
|
||||||
yu = NULL;
|
yu = NULL;
|
||||||
while ((yu = yn_each(y, yu)) != NULL) {
|
while ((yu = yn_each(y, yu)) != NULL) {
|
||||||
if (yang_keyword_get(yu) != Y_UNIQUE)
|
if (yang_keyword_get(yu) != Y_UNIQUE)
|
||||||
|
|
@ -861,6 +869,8 @@ check_list_unique_minmax(cxobj *xt,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* yprev if set, is a list that has been traversed
|
/* yprev if set, is a list that has been traversed
|
||||||
* This check is made in the loop as well - this is for the last list
|
* This check is made in the loop as well - this is for the last list
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue