On Fri, 16 Nov 2007 01:15:22 +0100 Magnus wrote:
MF> On tor, 2007-11-15 at 08:23 +0000, Colin Wernham wrote:
MF> > I have a problem with re-loading the snmpd.conf config using
MF> > update_config() function as it appears to not do any reloading of
MF> > config.
MF> 
MF> It does reload the config. If you were to try again with the flag
MF> -Dsnmpd_ports you would see it change the port specification.
MF> 
MF> > If I change the agentaddress config to a different port and then call
MF> > update_config(), the old port remains open and the new one is not
MF> > opened (as viewed by netstat -uan). 
MF> 
MF> This is also, sadly, true.
MF> The problem is that sockets are opened from the function
MF> init_master_agent and that is only called once from main.

Probably wouldn't be too hard to change that to some callback based system.
(SNMP_CALLBACK_POST_READ_CONFIG).

MF> A port is added => open the port.
MF>   What should happen if opening the port fails?

Depends on how intelligent we want to get. At the very least, a message should
be logged. If there are no other ports open, exiting would be a reasonable
response. Possibly after a few retries.

MF> A port is removed => close the port.
MF>   How should clients be notified? Should clients be notified?

Closing the port should be sufficient notification.

MF> Then there are some hard ones.
MF> 
MF> The interface set of a port is expanded or shrunk (e.g. change from
MF> *:161 to localhost:161)
MF>   Here connections on the interfaces that are left after the session   
MF>   creation MUST NOT get closed.

I wouldn't have a problem with simply closing all connections. Intelligent
clients will reconnect.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to