Hello all. I have another one problem after installing the latest versions of gsnmp, libsmi and scli from subversion. tcpdump shows that the IP address transferred from agent to scli is correct, but scli shows an empty string. Sometimes I see that the entire content of variable holding the IP address is '\001' repeats 100 times. Looks like trash (memory wasn't allocated?). Also, when I'm trying to fmt_ipv4_address valgrind says "Invalid read of address xxxxxx. Memory wasn't allocated or stack'd." And I've noticed the same issue with some integers, some strings. It looks like some problems with memory, but I haven't any clue to it. Everithing was fine before the update (except the setting of IP address).
tcpdump log: 12:57:24.155589 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 114) localhost.40136 > localhost.snmp: [bad udp cksum 54c1!] { SNMPv2c { GetNextRequest(71) R=1804289386 SSS-DGW-MIB::protocolRADIUSEnable SSS-DGW-MIB::protocolRADIUSServerIP SSS-DGW-MIB::protocolRADIUSSecret } }
12:57:24.156088 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 132) localhost.snmp > localhost.40136: [bad udp cksum b219!] { SNMPv2c { GetResponse(89) R=1804289386 SSS-DGW-MIB::protocolRADIUSEnable.0=1 SSS-DGW-MIB::protocolRADIUSServerIP.0=127.0.0.1 SSS-DGW-MIB::protocolRADIUSSecret.0="bad secret" } }
The GDB view into the variable: 2321 sss_dgw_mib_get_protocolRADIUS(interp->peer, &info, 0); 2323 if (interp->peer->error_status) (gdb) print *info $1 = {protocolRADIUSEnable = 0x81705b4, protocolRADIUSServerIP = 0x8170004 "", protocolRADIUSSecret = 0x8170678 "bad secret", _protocolRADIUSSecretLength = 10} (gdb) print *info->protocolRADIUSServerIP $3 = 0 '\0'
The definition of struct: typedef struct { gint32 *protocolRADIUSEnable; /* rw */ guchar *protocolRADIUSServerIP; /* rw SNMPv2-SMI::IpAddress */ #define SSS_DGW_MIB_PROTOCOLRADIUSSERVERIPLENGTH 4 guchar *protocolRADIUSSecret; /* rw OctetString */ #define SSS_DGW_MIB_PROTOCOLRADIUSSECRETMINLENGTH 0 #define SSS_DGW_MIB_PROTOCOLRADIUSSECRETMAXLENGTH 65535 guint16 _protocolRADIUSSecretLength; } sss_dgw_mib_protocolRADIUS_t;