From 3ccb263c247469dc1378f3cfc890e75f6d43d0d6 Mon Sep 17 00:00:00 2001 From: Francois Dumontet Date: Wed, 13 Sep 2023 14:29:34 +0200 Subject: [PATCH] bgpd: snmp MIB bg4v2 fix wrong type values snmpwalk exhibit the followinfg errors: BGP4V2-MIB::bgp4V2PeerLastErrorReceivedTime.1.ipv6z.10.125.0.2 = Wrong Type (should be Timeticks): Gauge32: 0 BGP4V2-MIB::bgp4V2PeerLastErrorReceivedTime.2.dns.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Wrong Type (should be Timeticks): Hex-STRING: 00 00 00 00 00 00 00 00 BGP4V2-MIB::bgp4V2PeerLastErrorSentTime.1.ipv6z.10.125.0.2 = Wrong Type (should be Timeticks): Gauge32: 178 BGP4V2-MIB::bgp4V2PeerLastErrorSentTime.2.dns.253.0.1.37.0.0.0.0.0.0.0.0.0.0.0.3 = Wrong Type (should be Timeticks): Hex-STRING: B2 00 00 00 00 00 00 00 Error: OID not increasing: BGP4V2-MIB::bgp4V2NlriIndex.1.4.10.200."".0.24.10.125.0.2 >= BGP4V2-MIB::bgp4V2NlriIndex.1.4.10.200."".0.24."".0.0.0 draft-ietf-idr-bgp4-mibv2-11 states the following bgp4V2PeerLastErrorReceivedTime OBJECT-TYPE SYNTAX TimeStamp bgp4V2PeerLastErrorSentTime OBJECT-TYPE SYNTAX TimeStamp we set the correct values Signed-off-by: Francois Dumontet --- bgpd/bgp_snmp_bgp4v2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bgpd/bgp_snmp_bgp4v2.c b/bgpd/bgp_snmp_bgp4v2.c index cfafae55dc..adfced175f 100644 --- a/bgpd/bgp_snmp_bgp4v2.c +++ b/bgpd/bgp_snmp_bgp4v2.c @@ -989,13 +989,13 @@ static struct variable bgpv2_variables[] = { 6, {1, 3, 1, BGP4V2_PEER_LAST_ERROR_SUBCODE_RECEIVED, 2, 16}}, {BGP4V2_PEER_LAST_ERROR_RECEIVED_TIME, - ASN_UNSIGNED, + ASN_TIMETICKS, RONLY, bgpv2PeerErrorsTable, 6, {1, 3, 1, BGP4V2_PEER_LAST_ERROR_RECEIVED_TIME, 1, 4}}, {BGP4V2_PEER_LAST_ERROR_RECEIVED_TIME, - ASN_UNSIGNED, + ASN_TIMETICKS, RONLY, bgpv2PeerErrorsTable, 6, @@ -1049,13 +1049,13 @@ static struct variable bgpv2_variables[] = { 6, {1, 3, 1, BGP4V2_PEER_LAST_ERROR_SUBCODE_SENT, 2, 16}}, {BGP4V2_PEER_LAST_ERROR_SENT_TIME, - ASN_UNSIGNED, + ASN_TIMETICKS, RONLY, bgpv2PeerErrorsTable, 6, {1, 3, 1, BGP4V2_PEER_LAST_ERROR_SENT_TIME, 1, 4}}, {BGP4V2_PEER_LAST_ERROR_SENT_TIME, - ASN_UNSIGNED, + ASN_TIMETICKS, RONLY, bgpv2PeerErrorsTable, 6,