RE: SubAgent crash in net-snmp-5.2.2
"Pamidipati Suresh-G20238" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
All, Patch is submitted for checking the -ve value of FD before calling FD_ISSET() in _sess_read() function, snmp_api.c file. Following is the link for the same. <http://sourceforge.net/tracker/index.php?func=detail&atid=312694&aid=15 62100&group_id=12694> http://sourceforge.net/tracker/index.php?func=detail&atid=312694&aid=156 2100&group_id=12694 Regards, Suresh. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Kurapati M-G19456 Sent: Monday, September 11, 2006 5:41 PM To: [email protected] Subject: SubAgent crash in net-snmp-5.2.2 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 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ 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