Menu

#2259 init_snmp() calls free_config()

open
nobody
agent (1105)
5
2012-11-08
2011-06-09
Bill Segall
No

In net-snmp-5.6.1.1/snmplib/read_config.c:429 we free all configuration. This happens when
we're configured not to read configs via NETSNMP_DS_LIB_DONT_READ_CONFIGS.

Within net-nmp-5.4-* there was a guard around this call to check whether we were not reading configs from file before clearing it. When running an agent this means that all configuration set before a call to init_snmp() is lost.

It may be that a decision has been made that all configuration should be done after the call to init_snmp() but this call having cleared all configuration data will then warn about missing configuration (e.g., snmplib/cavm_conf.c:1149) which implies that this freeing of configuration was not supposed to occur.

As a workaround it it is possible to init_snmp before attempting configuration, however this creates a window where teh agent has started but will not respond to snmp queries through lack of authorisation.

Bill.

Discussion


Log in to post a comment.