src: sync

This commit is contained in:
Franco Fichtner 2025-02-28 15:27:13 +01:00
parent a253e05da5
commit 0b1b0cb932
3 changed files with 4 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2014-2024 Ad Schellevis <ad@opnsense.org>
Copyright (c) 2014-2025 Ad Schellevis <ad@opnsense.org>
Copyright (c) 2017 Alexander Shursha <kekek2@ya.ru>
Copyright (c) 2004 Bachman Kharazmi
Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>

View File

@ -33,7 +33,6 @@ use OPNsense\Base\Messages\Message;
use OPNsense\Base\BaseModel;
use OPNsense\Core\Config;
/**
* Class IPsec
* @package OPNsense\IPsec
@ -201,7 +200,7 @@ class IPsec extends BaseModel
$result[$target_key] = !empty((string)$item) ? 'yes' : 'no';
} elseif (is_a($item, "OPNsense\\Base\\FieldTypes\\AuthenticationServerField")) {
$servers = [];
foreach(explode(',', (string)$item) as $item) {
foreach (explode(',', (string)$item) as $item) {
$idx = 'server' . (string)(count($servers) + 1);
$mapping = [];
if (isset($cnf->authserver)) {
@ -218,7 +217,6 @@ class IPsec extends BaseModel
}
}
}
}
$result[$target_key] = $servers;
} elseif ((string)$item != '') {

View File

@ -102,7 +102,8 @@ class M1_0_4 extends BaseModelMigration
} else {
if (isset($cnf->ipsec->phase1)) {
foreach ($cnf->ipsec->phase1 as $phase1) {
if (!isset($phase1->disabled) && isset($phase1->mobile) &&
if (
!isset($phase1->disabled) && isset($phase1->mobile) &&
$phase1->authentication_method == 'eap-radius'
) {
$model->charon->plugins->{'eap-radius'}->servers = (string)$phase1->authservers;