Update pfsense_zbx.php

Report correct Phase 1 status on non Carp enabled devices
This commit is contained in:
Dan Edwards 2021-03-19 10:35:02 +00:00 committed by GitHub
parent 0f279ff310
commit 57324cf3a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -603,8 +603,11 @@ function pfz_ipsec_status($ikeid,$reqid=-1,$valuekey='state'){
}
switch($valuekey) {
case 'state':
$value = pfz_valuemap('ipsec.state', strtolower($tmp_value));
$value = $value + (10 * ($carp_status-1));
if ($carp_status == 0) {
$value = pfz_valuemap('ipsec.state', strtolower($tmp_value));
} else {
$value = $value + (10 * ($carp_status-1));
}
break;
default:
$value = $tmp_value;