System: High Availability - when nosync is set on the secondary machine for a vip, the record seems to be added twice as merge_config_attributes() solves this generically for all types. exclude no sync from the $vipbackup in the custom handling code to fix this.

closes https://github.com/opnsense/core/issues/8911
This commit is contained in:
Ad Schellevis 2025-10-10 17:25:14 +02:00
parent 5c845f4b6d
commit f469cf8529

View file

@ -184,6 +184,8 @@ function restore_config_section_xmlrpc($new_config)
if (!array_key_exists($vipKey, $vhidVipsInNewConfig)) {
unset($config['virtualip']['vip'][$vipindex]);
}
} elseif (!empty($vip['vhid']) && !empty($vip['nosync'])) {
null; /* merge_config_attributes() will preserve these records */
} elseif (!isset($vhidVipsInNewConfig[$vipKey])) {
$vipbackup[$vipKey] = $vip;
}