]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Minor bugfix
authorVojtech Vilimek <vojtech.vilimek@nic.cz>
Wed, 30 Aug 2023 15:22:52 +0000 (17:22 +0200)
committerVojtech Vilimek <vojtech.vilimek@nic.cz>
Wed, 30 Aug 2023 15:22:52 +0000 (17:22 +0200)
proto/snmp/subagent.c

index f0d85f8d2d13968571851545e9fe6d0bba13400d..2a08a70dcc632f228437a0fd9b75a51eb0377b5d 100644 (file)
@@ -615,10 +615,10 @@ do_response(struct snmp_proto *p, byte *buf, uint size UNUSED)
 u8
 snmp_get_mib_class(const struct oid *oid)
 {
-  ASSUME(oid->n_subid > 2);
   if (oid->prefix != 2 && oid->ids[0] != SNMP_MIB_2)
     return SNMP_CLASS_INVALID;
 
+  ASSUME(oid->n_subid > 1);
   switch (oid->ids[1])
   {
     case SNMP_BGP4_MIB: