From 0b7dc24d34cae9c37f43945afb0612efdd29f32f Mon Sep 17 00:00:00 2001 From: UrBnW <40244829+UrBnW@users.noreply.github.com> Date: Fri, 24 Jul 2020 15:24:22 +0200 Subject: [PATCH] fix(whatchguard) maxint issue --- network/watchguard/snmp/mode/policyusage.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/network/watchguard/snmp/mode/policyusage.pm b/network/watchguard/snmp/mode/policyusage.pm index 8e9e8a75b..7f32c795f 100644 --- a/network/watchguard/snmp/mode/policyusage.pm +++ b/network/watchguard/snmp/mode/policyusage.pm @@ -122,6 +122,11 @@ sub manage_selection { $self->{output}->output_add(long_msg => "skipping '" . $result->{wgPolicyName} . "': no matching filter.", debug => 1); next; } + + # Must be a Watchguard bug, where wgPolicyCurrActiveConns sporadically returns 2^32−1... + if ($result->{wgPolicyCurrActiveConns} == 4294967295) { + $result->{wgPolicyCurrActiveConns} = 0; + } $self->{policy}->{$instance} = { display => $result->{wgPolicyName}, %$result