diff options
author | jim-p <jimp@pfsense.org> | 2012-08-13 09:15:01 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-08-13 09:15:01 -0400 |
commit | d583aa710a765748b46555a388b8cdd70f327b0b (patch) | |
tree | fbd1ba0627bb2f2fc23e20f4fc2ad1b02d00ba8d /etc | |
parent | 9cb6bef1e3f71d4eba30118bb0409a39e589a22b (diff) | |
download | pfsense-d583aa710a765748b46555a388b8cdd70f327b0b.zip pfsense-d583aa710a765748b46555a388b8cdd70f327b0b.tar.gz |
Add some safety belts.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/service-utils.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index bdfa7dd..487b41e 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -350,7 +350,7 @@ function find_service_by_name($name) { function find_service_by_openvpn_vpnid($vpnid) { $services = get_services(); foreach ($services as $service) - if ($service["vpnid"] == $vpnid) + if (($service["name"] == "openvpn") && isset($service["vpnid"]) && ($service["vpnid"] == $vpnid)) return $service; return array(); } @@ -358,7 +358,7 @@ function find_service_by_openvpn_vpnid($vpnid) { function find_service_by_cp_zone($zone) { $services = get_services(); foreach ($services as $service) - if ($service["zone"] == $zone) + if (($service["name"] == "captiveportal") && isset($service["zone"]) && ($service["zone"] == $zone)) return $service; return array(); } |