Public bug reported: When trying to create a row in the snmpTargetAddrTable in a 64-bit system the attempt fails with this error:
ddsk...@ddskufo-laptop:~/Skrivbord/SNMP RFC'er/snmpV2$ snmptable localhost snmpTargetAddrTable SNMP-TARGET-MIB::snmpTargetAddrTable: No entries ddsk...@ddskufo-laptop:~/Skrivbord/SNMP RFC'er/snmpV2$ snmpset localhost snmpTargetAddrRowStatus."'ulrik'" i 5 Error in packet. Reason: wrongLength (The set value has an illegal length from what the agent expects) Failed object: SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'ulrik' The error is located to this piece of code on row 1504 in net-snmp/agent/mibgroup/target/snmpTargetAddrEntry.c: if (var_val_len != sizeof(int)) { DEBUGMSGTL(("snmpTargetAddrEntry", "write to snmpTargetAddrRowStatus: bad length\n")); char s[128]; sprintf(&s, "int length %d != %d\n", sizeof(int), var_val_len); DEBUGMSGTL(("snmpTargetAddrEntry", s)); return SNMP_ERR_WRONGLENGTH; } var_val_len is reported as 4 sizeof(int) in a 64-bit system And 4 != 8, 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 != 4) { It would be suitable for both 32-bit and 64-bit systems. Package information: Package: snmpd Priority: optional Section: net Installed-Size: 1228 Maintainer: Ubuntu Core Developers <ubuntu-devel-disc...@lists.ubuntu.com> Original-Maintainer: Net-SNMP Packaging Team <pkg-net-snmp-de...@lists.alioth.debian.org> Architecture: amd64 Source: net-snmp Version: 5.4.2.1~dfsg0ubuntu1-0ubuntu2 Replaces: snmptraplogd Depends: libc6 (>= 2.4), libsnmp15 (>= 5.4.2.1~dfsg), libwrap0 (>= 7.6-4~), debconf (>= 0.5) | debconf-2.0, adduser, debconf, lsb-base (>= 3.2-13) Conflicts: snmp (<< 3.6-3), snmptraplogd Filename: pool/main/n/net-snmp/snmpd_5.4.2.1~dfsg0ubuntu1-0ubuntu2_amd64.deb Size: 953054 MD5sum: 003d4e890109109fe632e31545ca6a9c SHA1: 67805e1406c9ce59922c573e8dab15128a21172a SHA256: 1b923d0809e7b1c85a67226afcb38f53972eb8d3ec5310755179f5ef6688ef54 Description: SNMP (Simple Network Management Protocol) agents The Simple Network Management Protocol (SNMP) provides a framework for the exchange of management information between agents (servers) and clients. . The Net-SNMP agent is a daemon which listens for incoming SNMP requests from clients and provides responses. Homepage: http://net-snmp.sourceforge.net/ Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu Supported: 5y ** Affects: net-snmp (Ubuntu) Importance: Undecided Status: New -- Row creation in snmpTargetAddrTable fails in 64-bit version https://bugs.launchpad.net/bugs/587828 You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to net-snmp in ubuntu. -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs