Project

General

Profile

Actions

Bug #13097

closed

PHP error when upgrading from before configuration revision 21.6, ``ipsec_create_vtimap()`` is undefined

Added by Christopher Cope almost 2 years ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Category:
Backup / Restore
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:

Description

In function upgrade_215_to_216() in /etc/inc/upgrade_config.inc:6411 there is a call to ipsec_create_vtimap()

This function was removed in this commit https://gitlab.netgate.com/pfSense/pfSense/-/commit/bec6dcfbbef4832b34d47ca60b0671b23dc185d8?view=inline

That results in an error when trying to import a config that calls that function.


Files

13097.patch (1.45 KB) 13097.patch Christopher Cope, 04/26/2022 10:22 AM
Actions #1

Updated by Jim Pingle almost 2 years ago

I thought we had a workaround in place for that but I'm not seeing it now.

The function in question could be copied back into upgrade_config.inc as a local function declaration inside upgrade_215_to_216() with its name changed to be specific to that function as well. It could also likely remove a few parts of the original function that are redundant in the new location (no need to initialize things already initialized in the upgrade function).

Look at upgrade_218_to_219() and function upgrade219_get_ipsecifnum() for example.

Actions #2

Updated by Christopher Cope almost 2 years ago

  • Status changed from New to Pull Request Review
Actions #3

Updated by Christopher Cope almost 2 years ago

  • File 13097.patch added

Attached a patch file with the changes from the merge request for testing.

Actions #4

Updated by Christopher Cope almost 2 years ago

  • File deleted (13097.patch)
Actions #5

Updated by Christopher Cope almost 2 years ago

Fix merged.

New patch attached.

Actions #6

Updated by Jim Pingle almost 2 years ago

  • Subject changed from ipsec_create_vtimap is undefined to PHP error when upgrading from before configuration revision 21.6, ``ipsec_create_vtimap()`` is undefined

Updating subject for release notes.

Actions #7

Updated by Jim Pingle almost 2 years ago

  • Assignee set to Christopher Cope
Actions #8

Updated by Jim Pingle almost 2 years ago

  • Status changed from Feedback to Resolved

No PHP error on upgrade when coming from <21.6 now. Closing.

Actions #9

Updated by Jim Pingle 11 months ago

  • Affected Version set to 2.7.0
Actions

Also available in: Atom PDF