diff --git a/src/www/widgets/widgets/ipsec.widget.php b/src/www/widgets/widgets/ipsec.widget.php index 5828b640e..4a98e13a5 100644 --- a/src/www/widgets/widgets/ipsec.widget.php +++ b/src/www/widgets/widgets/ipsec.widget.php @@ -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;