Bug #3004
closed
config upgrade code needs to change VIP binding on IPsec
Added by Chris Buechler over 11 years ago.
Updated about 11 years ago.
Category:
Configuration Upgrade
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
- 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.
$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?
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.
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.
- Status changed from New to Feedback
- % Done changed from 0 to 100
- Status changed from Feedback to Resolved
Also available in: Atom
PDF