clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
216 stars 71 forks source link

NETCONF edit-config incoming list/leaf-list duplicates are not detected #500

Closed olofhagsand closed 6 months ago

olofhagsand commented 7 months ago

If NETCONF edit-config list with config merge input as follows, duplicates are not detected under certain circumstances:

  <c>
    <list>
       <a>1</a>
    </list>
    <list>
       <a>1</a>  <-- duplicate
    </list>
</c>

where c is a presence container, list is a list with key a. (There is a special case that detects for presence containers) It may be detected eventually by validate, but double keys may cause internal errors such as sorting/insert, etc.

For a leaf-list, it is not detected at all:

  <c>
    <leaf-list>one<leaf-list>
    <leaf-list>one<leaf-list>  <-- duplicate
</c>
olofhagsand commented 7 months ago

Fixed in 6b8f7754b8749a5a4b90e36267013f8c13c81c6c