----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://review.fenron.com/r/4/ -----------------------------------------------------------
Review request for Net-SNMP Coders. Summary ------- If you start snmpd twice (e.g., in Fedora: "service snmpd start", forget that you did that, and "service snmpd start" again), the second one exits after trying to bind to udp port 161. However, before it exits, it [re-]creates the /var/agentx/master socket, making the socket that's open by the still-running snmpd inaccessible. Agentx subagents that run after this time simply get a relatively inexplicable "Connection refused" -- inexplicable because lsof still shows snmpd having /var/agentx/master open. The fix seems pretty straightforward: move the real_init_master() (and maybe the real_init_smux()) call to after the "do" loop that calls netsnmp_transport_open_server() for all of the configured transports. This way a failure to initialize a transport will not result in initializing agentx at all. This addresses bug https://sourceforge.net/tracker/?func=detail&aid=2693670&group_id=12694&atid=112694. Diffs ----- trunk/net-snmp/agent/snmp_agent.c 17413 Diff: http://review.fenron.com/r/4/diff Testing ------- Wrote a test that did: 1. service snmpd start 2. connect to agentx, serve objects 3. service snmpd start 4. connect to agentx, try to serve objects Without this patch, step 4 fails, as the snmpd started in step 3 has wiped away the original /var/agentx/master. Thanks, Bill ------------------------------------------------------------------------------ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders