On Tue, 2 Mar 2010 10:54:53 -0500
Robert Story <[email protected]> wrote:

> On Wed, 13 Jan 2010 19:37:45 -0800 Stephen wrote:
> SH> It is documented in snmp.conf(5) that setting clientaddr is supposed
> SH> to be used as trap source address, but it doesn't work. The issue is
> SH> that the configuration handler for this value is in snmplib which is not
> SH> used in snmpd.
> 
> It should be used... snmpd calls init_snmp, which calls
> register_default_handlers, which registers it.
> 
> I suspect you're putting clientaddr in snmpd.conf instead of snmp.conf. If you
> want to do that, you have to prefix it for it to be recognized as a snmp.conf
> token.. e.g.
> 
>  [snmp] clientaddr 192.168.1.99
> 
> If that's not the case, further debugging is needed...

I put it in snmp.conf. It is a bug, see the patch. Please apply.


    Allow snmpd to have configured trap source address

    The source address for snmp traps is supposed to be configurable in
    snmp.conf but the string never gets parsed.

-------------------------- agent/agent_read_config.c --------------------------
index 83b74e8..bd3547f 100644
@@ -267,6 +267,8 @@ init_agent_read_config(const char *app)
     netsnmp_ds_register_config(ASN_INTEGER, app, "maxGetbulkResponses",
                                NETSNMP_DS_APPLICATION_ID,
                                NETSNMP_DS_AGENT_MAX_GETBULKRESPONSES);
+    netsnmp_ds_register_config(ASN_OCTET_STR, app, "clientaddr",
+                              NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_CLIENT_ADDR);
     netsnmp_init_handler_conf();
 
 #include "agent_module_dot_conf.h"

------------------------------------------------------------------------------
Download Intel&#174; 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to