]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
snmp: don't send traps when SNMP is not enabled
authorVincent Bernat <bernat@luffy.cx>
Sun, 16 Dec 2012 12:35:21 +0000 (13:35 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sun, 16 Dec 2012 12:35:21 +0000 (13:35 +0100)
src/daemon/agent.c

index 2e8a85cd8d113d9bd00b8c654ab55b1d31931248..5bc3773700589b21dcaaa5b74bba05587d675d3e 100644 (file)
@@ -1722,6 +1722,8 @@ agent_notify(struct lldpd_hardware *hardware, int type,
 
        netsnmp_variable_list *notification_vars = NULL;
 
+       if (!hardware->h_cfg->g_snmp) return;
+
        TAILQ_FOREACH(h, &hardware->h_cfg->g_hardware, h_entries) {
                inserts += h->h_insert_cnt;
                deletes += h->h_delete_cnt;