VPN: IPsec: Connections - missing remapping pool uuid to name, closes https://github.com/opnsense/core/issues/6324

This commit is contained in:
Ad Schellevis 2023-02-12 18:48:46 +01:00
parent 991f27ee94
commit 9d5e1edb95

View File

@ -192,6 +192,16 @@ class Swanctl extends BaseModel
}
}
}
if (!empty($data['pools'])) {
// pools are mapped by name for clearer identification and legacy support
// need to remap them in the output tree
foreach ($data['pools'] as $key => $value) {
if (isset($pool_names[$key])) {
$data['pools'][$pool_names[$key]] = $value;
unset($data['pools'][$key]);
}
}
}
return $data;
}