]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Do not load any MIB, do not use use persistent states
authorVincent Bernat <bernat@luffy.cx>
Sat, 15 Nov 2008 15:49:56 +0000 (16:49 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sat, 15 Nov 2008 15:49:56 +0000 (16:49 +0100)
src/agent.c

index 7d58e0a2cb44cca5e02dd4f5031cb82fc472f70a..c2f1685d85cdb72345c4a69e259145e2089dcf9f 100644 (file)
@@ -798,10 +798,14 @@ agent_init(struct lldpd *cfg, int debug)
 
        scfg = cfg;
 
-       init_agent("lldpAgent");
+       /* We are chrooted, we don't want to handle persistent states */
+       netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
+           NETSNMP_DS_LIB_DONT_PERSIST_STATE, TRUE);
+       /* Do not load any MIB */
+       setenv("MIBS", "", 1);
 
+       init_agent("lldpAgent");
        REGISTER_MIB("lldp", lldp_vars, variable8, lldp_oid);
-
        init_snmp("lldpAgent");
 
        if ((rc = register_sysORTable(lldp_oid, OID_LENGTH(lldp_oid),