#1071 override does not work with stand alone modules

proxy-override-etc
open
nobody
agent (1103)
5
2013-01-25
2004-04-20
Anonymous
No

Using the override statement for an OID that is loaded via
dlmod does not work. All the tokens in snmpd.conf get
loaded and
processed before the module get loaded, and the
override is ignored.
Calling netsnmp_config("override...."); from within the
module,
but after it has been initilaized, will work as a
workaround.

for ex;
the following statement in snmpd.conf will not work.

dlmod mymodule /mydir/mymodule.so
override -rw MY-MIB::myDisplayString.0 octet_str "test
override"

Adding the following in the module itself will work.

netsnmp_config("override -rw MY-MIB::myDisplayString.0
octet_str
\"test override\"");

Discussion

  • Robert Story
    Robert Story
    2006-02-10

    Logged In: YES
    user_id=76148

    Hmm.. I can think of two possible fixes, depending on how the code works:

    1) If the registration fails because there is no existing object registered, then maybe the dlmod load token needs to be registered for pre-mib-config, so it executes before the override token.

    2) If the registration works, then it will be overriden (no pun intended) b the second registration when dlmod loading happens. The solution there might be to have the override token register at a higher priority (which I think recent releases already do).