SubAgent crash in net-snmp-5.2.2
"Kurapati M-G19456" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hello list,
We are using NET-SNMP-5.2.2 in subagent code. We saw subagent crashed
when agent is crashed. Reason seems to be that, in _sess_read(),
FD_ISSET() is crashed.
Following is the code snippet:
file: net-snmp-5.2.2/snmplib/snmp_api.c
_sess_read()
{
.........
........
if (!fdset || !(FD_ISSET(transport->sock, fdset))) {
=============> Crash
DEBUGMSGTL(("sess_read", "not reading %d (fdset %p set %d)\n",
transport->sock, fdset,
fdset ? FD_ISSET(transport->sock, fdset) : -9));
return 0;
}
.......
.......
.......
}
We found that transport->sock value is -1 (0xFFFFFFFF).
Can we modify the check as follows? Will it have any other impact?
_sess_read()
{
...........
..........
.........
if (transport->sock != -1) ===============> Check to prevent the
crash
{
if (!fdset || !(FD_ISSET(transport->sock, fdset))) {
=============> Crash
DEBUGMSGTL(("sess_read", "not reading %d (fdset %p set %d)\n",
transport->sock, fdset,
fdset ? FD_ISSET(transport->sock, fdset) : -9));
return 0;
}
}
.....
.....
.....
} /* _sess_read() */
Please help us.
Regards
Mahesh
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users