From fed14f836367b2392c8c43bb6edc22f7e82e266f Mon Sep 17 00:00:00 2001 From: chaos_kao Date: Fri, 31 May 2024 15:08:16 +0800 Subject: [PATCH] The SNMP OID for IFName '1.3.6.1.2.1.31.1.1.1.1'returns the interface alias. It should return the interface name as 'EthernetXXX'. What I did: Change ifName in ifXTable from "EthX(PortY)" to "EthernetXXX". Why I did it: Requests that ifName in ifXTable is interface name same as ones showed in "show interfaces status". How I verified it: Use snmpwalk command "snmpwalk -v 2c -c public 1.3.6.1.2.1.31.1.1.1.1" to get ifName and front ports' name should be EthernetXXX. --- src/sonic_ax_impl/mibs/ietf/rfc2863.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic_ax_impl/mibs/ietf/rfc2863.py b/src/sonic_ax_impl/mibs/ietf/rfc2863.py index e5a41a0b8..678cf775a 100644 --- a/src/sonic_ax_impl/mibs/ietf/rfc2863.py +++ b/src/sonic_ax_impl/mibs/ietf/rfc2863.py @@ -197,7 +197,7 @@ def interface_name(self, sub_id): elif oid in self.vlan_oid_name_map: result = self.vlan_oid_name_map[oid] else: - result = self.if_alias_map[self.oid_name_map[oid]] + result = self.oid_name_map[oid] return result