return(NULL);
mbuf[0]='\0';
- while ( (p=fgets(mbuf, 256, fp)) && strncmp(mbuf, CURRENT_MIB_VERSION,
+ while ( (p=fgets(mbuf, 256, fp)) && strncmp(&mbuf[4], CURRENT_MIB_VERSION,
strlen(CURRENT_MIB_VERSION)));
if (!p) {
snmplib_debug(0, "Bad MIB version or tag missing,install original!\n");
cbdataAdd(rq, MEM_NONE);
PDU = snmp_pdu_create(0);
Community = snmp_parse(Session, PDU, buf, len);
+
+ if (!snmp_coexist_V2toV1(PDU)) { /* incompatibility */
+ debug(49, 3) ("snmp_agent_parse: Incompatible V2 packet.\n");
+ snmp_free_pdu(PDU);
+ snmp_agent_parse_done(0, rq);
+ return;
+ }
rq->community = Community;
rq->PDU = PDU;
this_reqid = PDU->reqid;