summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e648d4)
raw | patch | inline | side by side (parent: 1e648d4)
author | Florian Forster <octo@collectd.org> | |
Fri, 7 Sep 2012 08:11:42 +0000 (10:11 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 7 Sep 2012 08:23:09 +0000 (10:23 +0200) |
Some implementations of SNMP will send a special "variable" when you're
leaving the requested subtree with type "endOfMibView" aka.
"SNMP_ENDOFMIBVIEW". Examples of such implementations are Citrix
Netscalers and IBM's General Parallel File System (GPFS). Reading past
this special variable will result in weird values being returned.
This adds an appropriate check to csnmp_check_res_left_subtree().
Thanks to "Mark" for reporting this issue and clarifying.
leaving the requested subtree with type "endOfMibView" aka.
"SNMP_ENDOFMIBVIEW". Examples of such implementations are Citrix
Netscalers and IBM's General Parallel File System (GPFS). Reading past
this special variable will result in weird values being returned.
This adds an appropriate check to csnmp_check_res_left_subtree().
Thanks to "Mark" for reporting this issue and clarifying.
src/snmp.c | patch | blob | history |
diff --git a/src/snmp.c b/src/snmp.c
index 5c6cce267854f1d41504eea4ef854bade8eb9f9b..5f7d3e9c2a548a704a3b931d385f2817f6c3c9b0 100644 (file)
--- a/src/snmp.c
+++ b/src/snmp.c
vb = vb->next_variable, i++)
{
num_checked++;
- if (snmp_oid_ncompare (data->values[i].oid,
- data->values[i].oid_len,
- vb->name, vb->name_length,
- data->values[i].oid_len) != 0)
+
+ if ((vb->type == SNMP_ENDOFMIBVIEW)
+ || (snmp_oid_ncompare (data->values[i].oid,
+ data->values[i].oid_len,
+ vb->name, vb->name_length,
+ data->values[i].oid_len) != 0))
num_left_subtree++;
}