summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorVinicius Coque <vinicius.coque@bluepex.com>2011-05-25 14:35:40 -0300
committerVinicius Coque <vinicius.coque@bluepex.com>2011-05-25 14:35:40 -0300
commit669113f9d12a43391cd480390dfbfbecf55d544e (patch)
treee80e743ca3b885a272485d02ad06712ef62aec5d /usr/local
parent19bd7032b2c35e60ea505220e696d69659452d92 (diff)
parentdceff62e8144b56cb292e1a3fd69abe307072625 (diff)
downloadpfsense-669113f9d12a43391cd480390dfbfbecf55d544e.zip
pfsense-669113f9d12a43391cd480390dfbfbecf55d544e.tar.gz
Merge remote-tracking branch 'mainline/master' into inc
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/firewall_nat_out.php12
-rw-r--r--usr/local/www/services_captiveportal_vouchers.php3
2 files changed, 5 insertions, 10 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index 4649795..e6b5900 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -126,15 +126,11 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$a_out[] = $natent;
/* PPTP subnet */
- if($config['pptpd']['mode'] == "server") {
- if (is_ipaddr($config['pptpd']['localip'])) {
- if($config['pptpd']['pptp_subnet'] <> "")
- $ossubnet = $config['pptpd']['pptp_subnet'];
- else
- $ossubnet = "32";
- $osn = gen_subnet($config['pptpd']['localip'], $ossubnet);
+ if (($config['pptpd']['mode'] == "server") && is_private_ip($config['pptpd']['remoteip'])) {
+ $pptp_subnets = ip_range_to_subnet_array($config['pptpd']['remoteip'], long2ip32(ip2long($config['pptpd']['remoteip'])+$config['pptpd']['n_pptp_units']));
+ foreach ($pptp_subnets as $pptpsn) {
$natent = array();
- $natent['source']['network'] = "{$osn}/{$ossubnet}";
+ $natent['source']['network'] = $pptpsn;
$natent['sourceport'] = "";
$natent['descr'] = gettext("Auto created rule for PPTP server");
$natent['target'] = "";
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php
index 203906a..19171f4 100644
--- a/usr/local/www/services_captiveportal_vouchers.php
+++ b/usr/local/www/services_captiveportal_vouchers.php
@@ -116,9 +116,8 @@ if ($_GET['act'] == "del") {
exit;
}
}
-
/* print all vouchers of the selected roll */
-if ($_GET['act'] == "csv") {
+else if ($_GET['act'] == "csv") {
$privkey = base64_decode($config['voucher']['privatekey']);
if (strstr($privkey,"BEGIN RSA PRIVATE KEY")) {
$fd = fopen("{$g['varetc_path']}/voucher.private","w");
OpenPOWER on IntegriCloud