On Tue, 23 Feb 2010 17:59:41 +0100 Bart wrote:
BVA> The above is indeed only the case if NETSNMP_DS_LIB_ALARM_DONT_USE_SIG has
BVA> been set to zero (the default value is one), such that Net-SNMP alarms
BVA> trigger SIGALRM.

good.

BVA> Forking off a child process might introduce more issues than it solves. As
BVA> an example, what should happen with the child process when snmpd receives
BVA> SIGHUP ?

I wouldn't think anything. What do you think should happen?

BVA> It is not clear to me why a thread has been created to listen for
BVA> RTM_NEWADDR, RTM_DELADDR and RTM_NEWPREFIX messages instead of processing
BVA> the netlink socket data via snmp_sess_select() ?

excellent point.

BVA> Another remark: the code that handles the netlink messages is not correct.
BVA> The queue used by the Linux kernel to pass data from the kernel to user
BVA> space has a fixed size (configurable via SO_RCVBUF) and hence can overflow.
BVA> When such an overflow happens some of the RTM_* messages are lost. The
BVA> process that is listening for RTM_* messages must detect overflows and if 
an
BVA> overflow happened it must poll the current state such that the in-kernel
BVA> state and the state in the user process are again in sync. Overflows are
BVA> reported by the kernel by sending a message with the type NLMSG_ERROR and
BVA> setting an appropriate error code.

again, excellent point. I think we need a bug report for both of these.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to