summaryrefslogtreecommitdiff
path: root/module/bsnmp-regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/bsnmp-regex.c')
-rw-r--r--module/bsnmp-regex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/bsnmp-regex.c b/module/bsnmp-regex.c
index 19febca..5a77d6e 100644
--- a/module/bsnmp-regex.c
+++ b/module/bsnmp-regex.c
@@ -1099,7 +1099,8 @@ op_regexentry (struct snmp_context *ctx, struct snmp_value *value,
data->value_str : "", -1));
case LEAF_regexCounter:
- value->v.counter64 = expired ? 0 : data->value_int;
+ value->v.counter64 = (expired && data->type != TYPE_COUNTER) ?
+ 0 : data->value_int;
break;
default: