Bug #13097 ยป 13097.patch
| src/etc/inc/upgrade_config.inc | ||
|---|---|---|
| 6401 | 6401 |
return; |
| 6402 | 6402 |
} |
| 6403 | 6403 | |
| 6404 |
/* Deprecated method. */ |
|
| 6405 |
function upgrade216_ipsec_create_vtimap($ikeid, $idx) {
|
|
| 6406 |
$assigned = array_column($config['ipsec']['vtimaps']['item'], 'ifnum'); |
|
| 6407 |
asort($assigned, SORT_NUMERIC); |
|
| 6408 |
$new = 1; |
|
| 6409 |
foreach ($assigned as $ipsecifnum) {
|
|
| 6410 |
if ($ipsecifnum != $new) {
|
|
| 6411 |
break; |
|
| 6412 |
} |
|
| 6413 |
if ($new++ > 32767) {
|
|
| 6414 |
return(NULL); |
|
| 6415 |
} |
|
| 6416 |
} |
|
| 6417 |
return array( |
|
| 6418 |
"reqid" => $ikeid, |
|
| 6419 |
"index" => $idx, |
|
| 6420 |
"ifnum" => $new |
|
| 6421 |
); |
|
| 6422 |
} |
|
| 6423 | ||
| 6404 | 6424 |
$iflist = get_configured_interface_list_by_realif(true); |
| 6405 | 6425 | |
| 6406 | 6426 |
foreach ($config['ipsec']['vtimaps']['item'] as $idx => $vtimap) {
|
| ... | ... | |
| 6408 | 6428 |
continue; |
| 6409 | 6429 |
} |
| 6410 | 6430 | |
| 6411 |
$new_vtimap = ipsec_create_vtimap($vtimap['reqid'], |
|
| 6431 |
$new_vtimap = upgrade216_ipsec_create_vtimap($vtimap['reqid'],
|
|
| 6412 | 6432 |
$vtimap['index']); |
| 6413 | 6433 | |
| 6414 | 6434 |
/* |