summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-08-13 09:15:01 -0400
committerjim-p <jimp@pfsense.org>2012-08-13 09:15:01 -0400
commitd583aa710a765748b46555a388b8cdd70f327b0b (patch)
treefbd1ba0627bb2f2fc23e20f4fc2ad1b02d00ba8d /etc
parent9cb6bef1e3f71d4eba30118bb0409a39e589a22b (diff)
downloadpfsense-d583aa710a765748b46555a388b8cdd70f327b0b.zip
pfsense-d583aa710a765748b46555a388b8cdd70f327b0b.tar.gz
Add some safety belts.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/service-utils.inc4
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();
}
OpenPOWER on IntegriCloud