diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index de1c09e777..5518dee632 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -226,7 +226,7 @@ function captiveportal_configure() { touch("{$g['vardb_path']}/captiveportal.db"); /* kill any running minicron */ - killbypid("{$g['varrun_path']}/minicron.pid"); + killbypid("{$g['varrun_path']}/cp_prunedb.pid"); /* init ipfw rules */ captiveportal_init_rules(true); @@ -417,8 +417,12 @@ EOD; /* start up the webserving daemon */ captiveportal_init_webgui(); + /* Kill any existing prunecaptiveportal processes */ + if(file_exists("{$g['varrun_path']}/cp_prunedb.pid")) + killbypid("{$g['varrun_path']}/cp_prunedb.pid"); + /* start pruning process (interval defaults to 60 seconds) */ - mwexec("/usr/local/bin/minicron $croninterval {$g['varrun_path']}/minicron.pid " . + mwexec("/usr/local/bin/minicron $croninterval {$g['varrun_path']}/cp_prunedb.pid " . "/etc/rc.prunecaptiveportal"); /* generate radius server database */ @@ -429,7 +433,7 @@ EOD; } else { killbypid("{$g['varrun_path']}/lighty-CaptivePortal.pid"); - killbypid("{$g['varrun_path']}/minicron.pid"); + killbypid("{$g['varrun_path']}/cp_prunedb.pid"); captiveportal_radius_stop_all(); diff --git a/etc/inc/config.console.inc b/etc/inc/config.console.inc index 9005b79bd6..d1eb18aa42 100644 --- a/etc/inc/config.console.inc +++ b/etc/inc/config.console.inc @@ -303,9 +303,9 @@ EOD; echo "\nThe interfaces will be assigned as follows: \n\n"; + echo "WAN -> " . $wanif . "\n"; if ($lanif != "") echo "LAN -> " . $lanif . "\n"; - echo "WAN -> " . $wanif . "\n"; for ($i = 0; $i < count($optif); $i++) { echo "OPT" . ($i+1) . " -> " . $optif[$i] . "\n"; } diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index b20700420e..937d193753 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -88,6 +88,8 @@ $g = array( "disablethemeselection" => false, "disablehelpmenu" => false, "disablehelpicon" => false, + "disablecrashreporter" => false, + "crashreporterurl" => "http://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, "latest_config" => "7.7", "nopkg_platforms" => array("cdrom"), diff --git a/sbin/dhclient-script b/sbin/dhclient-script index ee98fa0b18..aaa8144192 100755 --- a/sbin/dhclient-script +++ b/sbin/dhclient-script @@ -184,8 +184,9 @@ add_new_routes() { fi ADDED_ROUTE=no + EXISTSGW=`/bin/ls -l /tmp/*_defaultgw | /usr/bin/wc -l` # Only allow the default route to be overridden if it's on our own interface - if [ -f "/tmp/${interface}_defaultgw" ]; then + if [ -f "/tmp/${interface}_defaultgw" -o $EXISTSGW -eq 0 ]; then $ROUTE delete default for router in $new_routers; do if [ "$new_ip_address" = "$router" ]; then diff --git a/usr/local/sbin/ovpn-linkup b/usr/local/sbin/ovpn-linkup index f962ac2d56..60489c2e6f 100755 --- a/usr/local/sbin/ovpn-linkup +++ b/usr/local/sbin/ovpn-linkup @@ -1,7 +1,5 @@ #!/bin/sh -# write nameservers to file needs dns fidnings?! - # let the configuration system know that the ip has changed. #/usr/local/sbin/pfSctl -c "interface newip $interface" /bin/echo $4 > /tmp/$1_router diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php index c75fe72215..8b03936d1a 100755 --- a/usr/local/www/crash_reporter.php +++ b/usr/local/www/crash_reporter.php @@ -42,19 +42,24 @@ require("guiconfig.inc"); require("functions.inc"); require("captiveportal.inc"); +define("FILE_SIZE", 450000); + function upload_crash_report($files) { + global $g; $post = array(); $counter = 0; foreach($files as $file) { - $post["file{$counter}"] = "@{$file}"; - $counter++; + if(filesize($cf) < FILE_SIZE) { + $post["file{$counter}"] = "@{$file}"; + $counter++; + } } $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)"); - curl_setopt($ch, CURLOPT_URL, "http://crashreporter.pfsense.org/crash_reporter.php"); + curl_setopt($ch, CURLOPT_URL, $g['crashreporterurl']); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $response = curl_exec($ch); @@ -71,8 +76,8 @@ function output_crash_reporter_html($crash_reports) { echo gettext("Contents of crash reports") . ":
"; echo ""; echo "

"; - echo ""; - echo ""; + echo "" . gettext(" - Submit this to the developers for inspection"); + echo "

" . gettext(" - Just delete the crash report and take me back to the Dashboard"); echo "

"; echo ""; } @@ -102,13 +107,12 @@ $crash_report_header .= "\nCrash report details:\n"; $files_to_upload = glob("/var/crash/*"); echo "

"; echo gettext("Uploading..."); - echo "

"; if(is_array($files_to_upload)) { $resp = upload_crash_report($files_to_upload); - print_r($resp); exec("rm /var/crash/*"); - echo gettext("Crash files have been submitted for inspection."); - echo "

" . gettext("Continue") . "" . gettext(" and delete crash report files."); + echo "

"; + print_r($resp); + echo "

" . gettext("Continue") . "" . gettext(" and delete crash report files from local disk."); } else { echo "Could not find any crash files."; } @@ -121,8 +125,10 @@ $crash_report_header .= "\nCrash report details:\n"; $crash_reports .= $crash_report_header; if(is_array($crash_files)) { foreach($crash_files as $cf) { - $crash_reports .= "\nFilename: {$cf}\n"; - $crash_reports .= file_get_contents($cf); + if(filesize($cf) < FILE_SIZE) { + $crash_reports .= "\nFilename: {$cf}\n"; + $crash_reports .= file_get_contents($cf); + } } } else { echo "Could not locate any crash data."; diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 736b362b7a..77933df3e2 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -295,6 +295,8 @@ if ($_POST) { // Firewall rules update_alias_names_upon_change('filter', 'rule', 'source', 'address', $_POST['name'], $origname); update_alias_names_upon_change('filter', 'rule', 'destination', 'address', $_POST['name'], $origname); + update_alias_names_upon_change('filter', 'rule', 'source', 'port', $_POST['name'], $origname); + update_alias_names_upon_change('filter', 'rule', 'destination', 'port', $_POST['name'], $origname); // NAT Rules update_alias_names_upon_change('nat', 'rule', 'source', 'address', $_POST['name'], $origname); update_alias_names_upon_change('nat', 'rule', 'source', 'port', $_POST['name'], $origname); diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 43520ba916..92376e593f 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -56,17 +56,19 @@ require_once('functions.inc'); require_once('guiconfig.inc'); require_once('notices.inc'); -// Check to see if we have a crash report -$crash = glob("/var/crash/*"); -$x = 0; -$skip_files = array(".", "..", "minfree", ""); -if(is_array($crash)) { - foreach($crash as $c) { - if (!in_array(basename($c), $skip_files)) - $x++; +if($g['disablecrashreporter'] != true) { + // Check to see if we have a crash report + $crash = glob("/var/crash/*"); + $x = 0; + $skip_files = array(".", "..", "minfree", ""); + if(is_array($crash)) { + foreach($crash as $c) { + if (!in_array(basename($c), $skip_files)) + $x++; + } + if($x > 0) + $savemsg = "{$g['product_name']} has detected a crash report. Click here for more information."; } - if($x > 0) - $savemsg = "{$g['product_name']} has detected a crash report. Click here for more information."; } ##build list of widgets diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index 8d12c7cec0..faaeb37212 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -82,6 +82,7 @@ $pconfig['radmac_secret'] = $config['captiveportal']['radmac_secret']; $pconfig['reauthenticate'] = isset($config['captiveportal']['reauthenticate']); $pconfig['reauthenticateacct'] = $config['captiveportal']['reauthenticateacct']; $pconfig['httpslogin_enable'] = isset($config['captiveportal']['httpslogin']); +$pconfig['httpsname'] = $config['captiveportal']['httpsname']; $pconfig['preauthurl'] = strtolower($config['captiveportal']['preauthurl']); $pconfig['cert'] = base64_decode($config['captiveportal']['certificate']); $pconfig['cacert'] = base64_decode($config['captiveportal']['cacertificate']); @@ -583,7 +584,7 @@ value=""> - +