Bug #3004
closedconfig upgrade code needs to change VIP binding on IPsec
100%
Description
In 2.0.x when you have an IPsec connection bound to a CARP IP, its interface is set as something like:
<interface>vip5</interface>
After upgrading to 2.1, the VIP is now wan_vip5, but the IPsec still refers to vip5 and is hence broken until changing it to wan_vip5. The config upgrade code needs to handle that automatically.
Files
Updated by Renato Botelho over 11 years ago
- Status changed from New to Feedback
There is already a function to do it, upgrade_085_to_086. I tested it locally and it worked as expected.
If you have the 2.0.x config.xml and want to send me it in private, I cah make a test and check the results, but it's supposed to work with any config since it uses a sed to change config.xml file directly.
Updated by Ermal Luçi over 11 years ago
$vipchg[] = "s/\\([^_]\\)vip{$vip['vhid']}\\([^0-9]\\)/\\1{$vip['interface']}_vip{$vip['vhid']}\\2/g\n";
Seems the [^_] is wrong here it is not present on earlier versions there, no?
Updated by Renato Botelho over 11 years ago
Ermal Luçi wrote:
[...]
Seems the [^_] is wrong here it is not present on earlier versions there, no?
[^_] means any char but _, to avoid touching unnecessary places. I don't think it's wrong.
Updated by Chris Buechler about 11 years ago
- File config-pfSense.localdomain-20130903124713.xml config-pfSense.localdomain-20130903124713.xml added
- Status changed from Feedback to New
that config upgrade code either gets skipped somehow or doesn't work, the attached config for example still has <interface>vip205</interface> after upgrading 2.0.x to 2.1.
Updated by Renato Botelho about 11 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset f2cc3344a19134a3dc594ff767be06f5af800553.
Updated by Renato Botelho about 11 years ago
Applied in changeset c59e21b5c706b46159ecc19b33977299754b07b9.