From f469cf85296e3da8fe0bb49f4aaee58617d5e065 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 10 Oct 2025 17:25:14 +0200 Subject: [PATCH] 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 --- src/etc/inc/xmlrpc/legacy.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/etc/inc/xmlrpc/legacy.inc b/src/etc/inc/xmlrpc/legacy.inc index 2a82d967d9..1984ddc791 100644 --- a/src/etc/inc/xmlrpc/legacy.inc +++ b/src/etc/inc/xmlrpc/legacy.inc @@ -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; }