snmp agent is not releasing the socket created for sending traps to
configured manages:
create_trap_session2(const char *sink, const char* sinkport,
char *com, int version, int pdutype)
{
netsnmp_transport *t;
netsnmp_session session, *sesp;
memset(&session, 0, sizeof(netsnmp_session));
session.version = version;
if (com) {
session.community = (u_char *) com;
session.community_len = strlen(com);
}
...................................................................................
...................................................................................
t = netsnmp_tdomain_transport_full("snmptrap", sink, 0, NULL, sinkport);
if (t != NULL) {
sesp = snmp_add(&session, t, NULL, NULL);
if (sesp) {
return add_trap_session(sesp, pdutype,
(pdutype == SNMP_MSG_INFORM), version);
}
}
...................................................................................
...................................................................................
}
The socket re created every time in ' netsnmp_tdomain_transport_full' call
for the same destination and never getting release resulting in resource
leak and further choking snmp at select call in main():snmpd.c
Why we are not releasing the socket created after sending the trap to
manager or using the same Sessions object (which contain the socket info)
for the same destination?
-Vishal
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users