SNMP: Fixed leafref index issue and table min-column issue for mult index

This commit is contained in:
Olof hagsand 2022-06-17 12:18:58 +02:00
parent ebfd173e0b
commit fa87b7d59f
3 changed files with 9 additions and 4 deletions

View file

@ -489,11 +489,14 @@ snmp_table_get(clicon_handle h,
while ((ys = yn_each(yt, ys)) != NULL) {
if (yang_keyword_get(ys) != Y_LEAF)
continue;
/* reset oid */
oidleaflen = MAX_OID_LEN;
if ((ret = yangext_oid_get(ys, oidleaf, &oidleaflen, NULL)) < 0)
goto done;
if (ret == 0)
goto done;
assert(oidtlen + 1 == oidleaflen);
if (oidtlen + 1 != oidleaflen) /* Indexes may be from other OID scope, skip those */
continue;
if (oids[oidleaflen-1] == oidleaf[oidleaflen-1])
break;
}