]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: snmp MIB bg4v2 fix wrong type values
authorFrancois Dumontet <francois.dumontet@6wind.com>
Wed, 13 Sep 2023 12:29:34 +0000 (14:29 +0200)
committerFrancois Dumontet <francois.dumontet@6wind.com>
Tue, 19 Sep 2023 12:26:41 +0000 (14:26 +0200)
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 <francois.dumontet@6wind.com>
bgpd/bgp_snmp_bgp4v2.c

index cfafae55dc936c4f0117b8aadd56923dbe38e8a8..adfced175f4fc4af747a69e973c77feed805f278 100644 (file)
@@ -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,