diff options
author | Ermal <eri@pfsense.org> | 2011-07-27 17:39:57 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-07-27 17:40:13 +0000 |
commit | 1fb8d3140624206d6c455f9247a2f1671c23c26c (patch) | |
tree | 80e0400790a4c35ade803871866b0fc1f4b85523 /etc/inc/vpn.inc | |
parent | 4cf82d52943b00c2710b7867387230a0e58225be (diff) | |
download | pfsense-1fb8d3140624206d6c455f9247a2f1671c23c26c.zip pfsense-1fb8d3140624206d6c455f9247a2f1671c23c26c.tar.gz |
Prevent php from coring if the wrong parameters are passed to ip2long
Diffstat (limited to 'etc/inc/vpn.inc')
-rw-r--r-- | etc/inc/vpn.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 128f403..94af6e2 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -1036,6 +1036,11 @@ function vpn_pptpd_configure() { unlink_if_exists("{$g['varetc_path']}/pptp-vpn/mpd.secret"); } + if (empty($pptpdcfg['n_pptp_units'])) { + log_error("Something wrong in the PPTPd configuration. Preventing starting the daemon because issues would arise."); + return; + } + /* make sure pptp-vpn directory exists */ if (!file_exists("{$g['varetc_path']}/pptp-vpn")) mkdir("{$g['varetc_path']}/pptp-vpn"); |