Skip to content

Commit b5815d9

Browse files
[LLDP]: Modify OID index of LLDPRemTableUpdater MIB (#155)
* [LLDP]: LLDPRemTableUpdater index in OID is a tuple of (if index, remote time mark, remote device index). In case of multi-asic platform, when querying this MIB it can happen that same if index result is seen in SNMP walk, with a different remote time mark. To avoid showing same if index result in the result, set remote time mark to 0. * Add code comment.
1 parent d5f2b92 commit b5815d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sonic_ax_impl/mibs/ieee802_1ab.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,12 @@ def update_data(self):
430430
if not lldp_kvs:
431431
continue
432432
try:
433-
time_mark = int(lldp_kvs[b'lldp_rem_time_mark'])
433+
# OID index for this MIB consists of remote time mark, if_oid, remote_index.
434+
# For multi-asic platform, it can happen that same interface index result
435+
# is seen in SNMP walk, with a different remote time mark.
436+
# To avoid repeating the data of same interface index with different remote
437+
# time mark, remote time mark is made as 0 in the OID indexing.
438+
time_mark = 0
434439
remote_index = int(lldp_kvs[b'lldp_rem_index'])
435440
self.if_range.append((time_mark,
436441
if_oid,

0 commit comments

Comments
 (0)