Project

General

Profile

Actions

Bug #13097

closed

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

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

Added by Christopher Cope over 4 years ago. Updated about 3 years 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

Updated by Jim Pingle over 4 years ago Actions #1

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.

Updated by Christopher Cope over 4 years ago Actions #2

  • Status changed from New to Pull Request Review

Updated by Christopher Cope over 4 years ago Actions #3

  • File 13097.patch added

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

Updated by Christopher Cope over 4 years ago Actions #4

  • File deleted (13097.patch)

Updated by Christopher Cope over 4 years ago Actions #5

Fix merged.

New patch attached.

Updated by Jim Pingle over 4 years ago Actions #6

  • 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.

Updated by Jim Pingle over 4 years ago Actions #7

  • Assignee set to Christopher Cope

Updated by Jim Pingle about 4 years ago Actions #8

  • Status changed from Feedback to Resolved

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

Updated by Jim Pingle about 3 years ago Actions #9

  • Affected Version set to 2.7.0
Actions

Also available in: Atom