I have been trying to get the clientaddr setting to work as the source
for traps for a while and I think I have finally figured out why it
never works.

Here is some selected lines from a full debug log:

read_config: /etc/snmp/snmp.conf:1 examining: clientAddr
netsnmp_udp: open remote UDP: []:162:41472
read_config: /etc/snmp/snmp.conf:1 examining: clientAddr
read_config: Found a parser. Calling it: clientAddr /
netsnmp_ds_handle_config: handling clientAddr
netsnmp_ds_handle_config: setting: token=clientaddr, type=4, id=LIB,

The trap sink is set to
The clientaddr is set to (which is assigned to an interface
on the trap source machine.)

It seems pretty obvious from the above, that because everything is
processed in the order the config is read, the trap2sink connection is
configured before clientaddr is even added to the default store, which
means it doesn't bind to the clientaddr since it isn't configured yet
when the check is made.

To fix this bug, somehow clientaddr has to be processed before
trap2sink, which I can't figure out to do (how do you make it process
snmp.conf before snmpd.conf?), or better yet: read in all config
settings before processing the settings. That way all values would be
in the configuration store before calling any functions that might want
to use them. The current method seems very unpredictable, and makes the
configuration file very sensitive to the order of options.

Len Sorensen

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Net-snmp-coders mailing list