Revision 9fab01ea
Added by Christopher Cope about 2 years ago
src/etc/inc/upgrade_config.inc | ||
---|---|---|
6224 | 6224 |
$config['system']['hn_altq_enable'] = true; |
6225 | 6225 |
} |
6226 | 6226 |
|
6227 |
/* Update IPsec VTI to new VTIMAP format
|
|
6227 |
/* Update IPsec VTI to new VTIMAP format |
|
6228 | 6228 |
* https://redmine.pfsense.org/issues/9592 |
6229 | 6229 |
*/ |
6230 | 6230 |
function upgrade_208_to_209() { |
... | ... | |
6390 | 6390 |
|
6391 | 6391 |
/* Fix VTI interface numbers */ |
6392 | 6392 |
function upgrade_215_to_216() { |
6393 |
global $config; |
|
6394 |
|
|
6395 |
init_config_arr(array('ipsec', 'vtimaps', 'item')); |
|
6396 |
|
|
6397 |
if (count($config['ipsec']['vtimaps']['item']) == 0) { |
|
6393 |
if (count(config_get_path('ipsec/vtimaps/item', [])) == 0) { |
|
6398 | 6394 |
return; |
6399 | 6395 |
} |
6400 | 6396 |
|
6401 | 6397 |
/* Deprecated method. */ |
6402 | 6398 |
function upgrade216_ipsec_create_vtimap($ikeid, $idx) { |
6403 |
$assigned = array_column($config['ipsec']['vtimaps']['item'], 'ifnum');
|
|
6399 |
$assigned = array_column(config_get_path('ipsec/vtimaps/item', []), 'ifnum');
|
|
6404 | 6400 |
asort($assigned, SORT_NUMERIC); |
6405 | 6401 |
$new = 1; |
6406 | 6402 |
foreach ($assigned as $ipsecifnum) { |
... | ... | |
6420 | 6416 |
|
6421 | 6417 |
$iflist = get_configured_interface_list_by_realif(true); |
6422 | 6418 |
|
6423 |
foreach ($config['ipsec']['vtimaps']['item'] as $idx => $vtimap) {
|
|
6419 |
foreach (config_get_path('ipsec/vtimaps/item', []) as $idx => $vtimap) {
|
|
6424 | 6420 |
if ($vtimap['ifnum'] <= 32767) { |
6425 | 6421 |
continue; |
6426 | 6422 |
} |
... | ... | |
6440 | 6436 |
|
6441 | 6437 |
/* Interface is assigned */ |
6442 | 6438 |
if (isset($iflist[$old_if])) { |
6443 |
$config['interfaces'][$iflist[$old_if]]['if'] = |
|
6444 |
'ipsec' . $new_vtimap['ifnum']; |
|
6439 |
config_set_path('interfaces/' . $iflist[$old_if] . '/if', 'ipsec' . $new_vtimap['ifnum']); |
|
6445 | 6440 |
} |
6446 | 6441 |
|
6447 |
$config['ipsec']['vtimaps']['item'][$idx] = $new_vtimap;
|
|
6442 |
config_set_path('ipsec/vtimaps/item/' . $idx, $new_vtimap);
|
|
6448 | 6443 |
} |
6449 | 6444 |
} |
6450 | 6445 |
|
Also available in: Unified diff
inc/upgrade_config: PHP 8.x issues. Fixes #14400