From 1f6d9c48f4b8f5a03433ce64e3f9712f0fa9f290 Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Sat, 13 Oct 2007 23:51:13 +0000 Subject: Do not create array items for disabled vpn tunnels --- usr/local/www/widgets/widgets/ipsec.widget.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/widgets/widgets/ipsec.widget.php b/usr/local/www/widgets/widgets/ipsec.widget.php index 526fd63..540eab6 100644 --- a/usr/local/www/widgets/widgets/ipsec.widget.php +++ b/usr/local/www/widgets/widgets/ipsec.widget.php @@ -54,6 +54,11 @@ $tun_disabled = "false"; $foundsrc = false; $founddst = false; + + if (isset($tunnel['disabled'])) { + $tun_disabled = "true"; + continue; + } if(output_ipsec_tunnel_status($tunnel)) { /* tunnel is up */ @@ -65,9 +70,6 @@ $inactivecounter++; } - if (isset($tunnel['disabled'])) { - $tun_disabled = "true"; - } $ipsec_detail_array[] = array('src' => $tunnel['interface'], 'dest' => $tunnel['remote-gateway'], 'remote-subnet' => $tunnel['remote-subnet'], -- cgit v1.1