Commit 1dd50732 authored by Franco Fichtner's avatar Franco Fichtner

ipsec: match end of key more carefully #1552

parent 2c97a083
......@@ -63,7 +63,7 @@ if (isset($config['ipsec']['phase1'])) {
foreach ($sas_value['child-sas'] as $child_sa_key => $child_sa_value) {
if (!isset($ipsec_tunnels[$child_sa_key])) {
/* XXX bug on strongSwan 5.5.2 appends -3 and -4 here? */
$child_sa_key = preg_replace('/-.*$/', '', $child_sa_key);
$child_sa_key = preg_replace('/-[^-]+$/', '', $child_sa_key);
}
if (isset($ipsec_tunnels[$child_sa_key])) {
$ipsec_tunnels[$child_sa_key]['active'] = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment