From ccfa210433ffe149b99393a9b44fa183b769f8ee Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 31 Jul 2025 22:45:37 +0200 Subject: [PATCH] VPN: IPsec - fix regression in https://github.com/opnsense/core/commit/b440c12e80b86, all indexed fields are flushed into the config, these virtual ones shouldn't go there. closes https://github.com/opnsense/core/issues/9022 (simplified version which will ignore future volatile fields) --- src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.php b/src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.php index 42f0859aa4..4fee8249dd 100644 --- a/src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.php +++ b/src/opnsense/mvc/app/models/OPNsense/IPsec/Swanctl.php @@ -191,8 +191,8 @@ class Swanctl extends BaseModel $parent = null; $thisnode = []; foreach ($node->iterateItems() as $attr_name => $attr) { - if ($key == 'connections' && in_array($attr_name ,['local_ts', 'remote_ts'])) { - /* virtual nodes belonging to child */ + if ($attr->getInternalIsVolatile()) { + /* skip volatile nodes, usually calculated */ continue; } elseif ($attr_name == 'connection' && isset($data['connections'][(string)$attr])) { $parent = (string)$attr;