In snmp_api.h, the snmp message id (msgid)is defined in struct snmp_pdu
as a long value. Then in snmp_api.c, snmpv3_parse does the following
message id boundry check.

if (pdu->msgid < 0 || pdu->msgid > 0x7fffffff) {
snmp_log(LOG_ERR, "Received bad msgID (%ld %s %s).\n",
(pdu->msgid < 0) ? "<" : ">",
(pdu->msgid < 0) ? "0" : "2^31 - 1");

This appears to limit the message size to 2147483648, where if the full
32 bits were used it could take up to 4294967296. What we are seeing is
that there are devices generating message ids greater than 2147483648,
which results in those messages being dropped. In particular we
encountered this with trap messages.

Can anyone comment on whether the boundry should allow for 32 bits? I
think the long would imply signed, which would explain the boundry, but
should it be unsigned long. Thanks.


Check out the new Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.;
Net-snmp-coders mailing list