From 3c718d162cad94f23fb360f7ffda6b8985f80fef Mon Sep 17 00:00:00 2001 From: Vojtech Vilimek Date: Wed, 30 Aug 2023 17:22:52 +0200 Subject: [PATCH] Minor bugfix --- proto/snmp/subagent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/snmp/subagent.c b/proto/snmp/subagent.c index f0d85f8d2..2a08a70dc 100644 --- a/proto/snmp/subagent.c +++ b/proto/snmp/subagent.c @@ -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: -- 2.47.2