Comment 1 for bug 587828

Revision history for this message
Ulrik Forsgren (ulrik-forsgren) wrote :

A corretion to data sizes above, the should be the otherway around.

var_val_len is reported as 8
sizeof(int) is 4 in a 64-bit system

And 8 != 4, which means SNMP_ERR_WRONGLENGTH will be returned.

In the case sizeof(int) should be replaced with 4 and the if statement should look like:
if (var_val_len != 8) {

or possibly

if (var_val_len != sizeof(long)) {

This has been reported earlier for net-snmp:
http://sourceforge.net/tracker/index.php?func=detail&aid=2972579&group_id=12694&atid=112694