[TriLUG] Debian Sarge '-t' to snmptrapd not work

Brian Weaver cmdrclueless at gmail.com
Fri May 5 00:11:23 EDT 2006


Hi all,

I've been having a problem with the snmptrapd agent on my Debian
stable (sarge) box. I *think* I might know the reason for my problem,
but I'm wondering if anyone else can reproduce it. If my thoughts are
correct, it's going to require a source patch and rebuild to get it
working correctly. I'm also going to discuss it with the net-snmp
development team, but their site is unreachable from my computer at
the moment.

At issue is the logging of traps to syslog. According to the man pages
I should be able to add the '-t' option to the command line of
snmptrapd to prevent the traps from being passed to syslog. This
*should* make snmptrapd only run trap handlers from the conf file.
Unfortunately, it doesn't seem to work at all.

I downloaded the debian stable source and browsed through it. Based on
the code I cannot find any logical reason why it's not working
correctly. My current thoughts, it's a problem with dynamic linking.
The variable that is checked is defined and allocated in the binary
snmptrapd. The logging is in a shared library that has an undefined
reference for the global 'SyslogTrap'. In theory the linker *should*
fix up the references and things should work correctly. The '-t' flag
increments the variable and a non-zero value prevents the logging of
the trap to syslog.

So why the code looks correct, it doesn't seem to function correctly.
If anyone else could let me know if the '-t' option works for you I
would appreciate it.

Thanks

-Brian

--

/* insert witty comment here */



More information about the TriLUG mailing list