Commit 4dba7e56 authored by Isaac (.ike) Levy's avatar Isaac (.ike) Levy Committed by Franco Fichtner

A human read and cleaned up all inappropriate occurances of 'pfSense' and...

A human read and cleaned up all inappropriate occurances of 'pfSense' and 'pfsense'., (e.g. this was not an automated find/replace, but instead, a careful pass through the code.)
Signed-off-by: 's avatarIsaac (.ike) Levy <ike@blackskyresearch.net>
parent c5da2c14
......@@ -50,7 +50,7 @@ function parse_config()
if (count($backups) > 0) {
// load last backup
log_error(gettext("No (valid) config.xml found, attempting last known config restore."));
file_notice("config.xml", gettext("No (valid) config.xml found, attempting last known config restore."), "pfSenseConfigurator", "");
file_notice("config.xml", gettext("No (valid) config.xml found, attempting last known config restore."), "OPNsenseConfigurator", "");
$cnf->restoreBackup($backups[0]);
} else {
// we don't have backups, try to load the default
......
......@@ -240,7 +240,7 @@ function filter_configure_sync($delete_states_if_needed = true)
$limitrules .= "set limit states {$config['system']['maximumstates']}\n";
$limitrules .= "set limit src-nodes {$config['system']['maximumstates']}\n";
} else {
$max_states = pfsense_default_state_size();
$max_states = default_state_size();
$limitrules .= "set limit states {$max_states}\n";
$limitrules .= "set limit src-nodes {$max_states}\n";
}
......
......@@ -66,7 +66,7 @@ function setup_gateways_monitor() {
$apinger_default = return_apinger_defaults();
$apingerconfig = <<<EOD
# pfSense apinger configuration file. Automatically Generated!
# OPNsense apinger configuration file. Automatically Generated!
{$apinger_debug}
......@@ -329,9 +329,9 @@ EOD;
$apingerconfig .= $alarmscfg;
$apingerconfig .= $apingercfg;
# Create gateway quality RRD with settings more suitable for pfSense graph set,
# Create gateway quality RRD with settings more suitable for OPNsense graph set,
# since apinger uses default step (300; 5 minutes) and other settings that don't
# match the pfSense gateway quality graph set.
# match the OPNsense gateway quality graph set.
create_gateway_quality_rrd("{$g['vardb_path']}/rrd/{$gateway['name']}-quality.rrd");
}
@file_put_contents("{$g['varetc_path']}/apinger.conf", $apingerconfig);
......@@ -729,7 +729,7 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
global $config, $g;
/*
* NOTE: The code below is meant to replace the default gateway when it goes down.
* This facilitates services running on pfSense itself and are not handled by a PBR to continue working.
* This facilitates services running on OPNsense itself and are not handled by a PBR to continue working.
*/
$upgw = "";
$dfltgwdown = false;
......
......@@ -255,7 +255,7 @@ function send_smtp_message($message, $subject = "(no subject)") {
$smtp = new smtp_class;
$from = "pfsense@{$config['system']['hostname']}.{$config['system']['domain']}";
$from = "opnsense@{$config['system']['hostname']}.{$config['system']['domain']}";
$to = $config['notifications']['smtp']['notifyemailaddress'];
$smtp->host_name = $config['notifications']['smtp']['ipaddress'];
......
......@@ -63,7 +63,7 @@ $openvpn_verbosity_level = array(
* a CA configuration parameter. In this mode,
* clients don't send a certificate so there is
* no need for a CA. If we require that admins
* provide one in the pfSense UI due to a bogus
* provide one in the OPNsense UI due to a bogus
* requirement imposed by OpenVPN, it could be
* considered very confusing ( I know I was ).
*
......
......@@ -1231,17 +1231,22 @@ function is_fqdn($fqdn) {
return($hostname);
}
function pfsense_default_state_size() {
function default_state_size()
{
/* get system memory amount */
$memory = get_memory();
$physmem = $memory[0];
/* Be cautious and only allocate 10% of system memory to the state table */
$max_states = (int) ($physmem/10)*1000;
return $max_states;
}
function pfsense_default_table_entries_size() {
function default_table_entries_size()
{
$current = `pfctl -sm | grep table-entries | awk '{print $4};'`;
return $current;
}
......
......@@ -892,7 +892,7 @@ function enable_rrd_graphing() {
}
# Create gateway quality RRD with settings suitable for pfSense graph set.
# Create gateway quality RRD with settings suitable for OPNsense graph set.
function create_gateway_quality_rrd($rrd_file) {
global $g;
$rrdinterval = 60;
......
......@@ -1812,7 +1812,7 @@ function services_dnsmasq_configure()
if (isset($config['dnsmasq']['no_private_reverse'])) {
/* Note: Carrier Grade NAT (CGN) addresses 100.64.0.0/10 are intentionally not here. */
/* End-users should not be aware of CGN addresses, so reverse lookups for these should not happen. */
/* Just the pfSense WAN might get a CGN address from an ISP. */
/* Just the OPNsense WAN might get a CGN address from an ISP. */
$args .= " --server=/10.in-addr.arpa/ ";
$args .= " --server=/168.192.in-addr.arpa/ ";
/* Unfortunately the 172.16.0.0/12 range does not map nicely to the in-addr.arpa scheme. */
......@@ -1964,7 +1964,7 @@ EOD;
" " . php_uname("r") . " " . php_uname("m");
$snmpdconf .= <<<EOD
system := 1 # pfSense
system := 1
%snmpd
sysDescr = "{$sysDescr}"
begemotSnmpdDebugDumpPdus = 2
......
......@@ -1476,7 +1476,7 @@ function system_ntp_configure($start_ntpd = true)
unset($ts);
$ntpcfg .= "\n\n";
$ntpcfg .= "disable monitor\n"; //prevent NTP reflection attack, see https://forum.pfsense.org/index.php/topic,67189.msg389132.html#msg389132
$ntpcfg .= "disable monitor\n"; //prevent NTP reflection attack, see https://ics-cert.us-cert.gov/advisories/ICSA-14-051-04
if (!empty($config['ntpd']['clockstats']) || !empty($config['ntpd']['loopstats']) || !empty($config['ntpd']['peerstats'])) {
$ntpcfg .= "enable stats\n";
$ntpcfg .= 'statistics';
......
......@@ -202,7 +202,7 @@ DISABLESYSLOGCLOG=`/usr/bin/grep -c disablesyslogclog /conf/config.xml`
ENABLEFIFOLOG=`/usr/bin/grep -c usefifolog /conf/config.xml`
LOG_FILES="system filter dhcpd vpn pptps poes l2tps openvpn portalauth ipsec ppp relayd wireless lighttpd ntpd gateways resolver routing"
DEFAULT_LOG_FILE_SIZE=`/usr/local/bin/xmllint --xpath 'string(//pfsense/syslog/logfilesize)' /conf/config.xml`
DEFAULT_LOG_FILE_SIZE=`/usr/local/bin/xmllint --xpath 'string(//opnsense/syslog/logfilesize)' /conf/config.xml`
if [ ! ${DEFAULT_LOG_FILE_SIZE} ]; then
DEFAULT_LOG_FILE_SIZE=511488
fi
......
......@@ -89,7 +89,7 @@ if (isset($config['system']['ssh']['port'])) {
* settings that need toggling, then toggle them!
*/
/* Include default configuration for pfSense */
/* Include default configuration for OPNsense */
$sshconf = "# This file was automatically generated by /usr/local/etc/rc.sshd\n";
$sshconf .= "Port {$sshport}\n";
$sshconf .= "Protocol 2\n";
......
......@@ -34,6 +34,6 @@ print_r($acc_list);
//$config = \Core\Core\Config::getInstance();
//$config->dump();
//print_r($config->xpath('//pfsense/interfaces/*') );
//print_r($config->xpath('//opnsense/interfaces/*') );
//$rules= new \Core\Captiveportal\Rules();
......@@ -651,7 +651,7 @@ function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $usead
$friendly_name = $settings['description'];
$visc_settings = <<<EOF
#-- Config Auto Generated By pfSense for Viscosity --#
#-- Config Auto Generated for Viscosity --#
#viscosity startonopen false
#viscosity dhcp true
......
......@@ -391,7 +391,7 @@ include("head.inc");
<input id="submit" name="clear" type="submit" class="btn btn-primary" value="<?=gettext("Clear log");?>" />
</form>
<p><span class="vexpl"><a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">TCP Flags</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR</span></p>
<p><span class="vexpl"><a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol">TCP Flags</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR</span></p>
</div>
......
......@@ -143,7 +143,7 @@ include("head.inc");
</table>
</div>
<p><span class="vexpl"><a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F"><?=gettext("TCP Flags"); ?></a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR</span></p></div>
<p><span class="vexpl"><a href="http://en.wikipedia.org/wiki/Transmission_Control_Protocol"><?=gettext("TCP Flags"); ?></a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR</span></p></div>
</div>
</section>
</div>
......
......@@ -197,7 +197,7 @@ if ($_POST) {
include("head.inc");
/* put your custom HTML head content here */
/* using some of the $pfSenseHead function calls */
/* using some of the new function calls */
$jscriptstr = <<<EOD
<script type="text/javascript">
//<![CDATA[
......
......@@ -137,7 +137,7 @@ function get_pfstate($percent=false) {
if (isset($config['system']['maximumstates']) and $config['system']['maximumstates'] > 0)
$maxstates="{$config['system']['maximumstates']}";
else
$maxstates=pfsense_default_state_size();
$maxstates=default_state_size();
$curentries = `/sbin/pfctl -si |grep current`;
if (preg_match("/([0-9]+)/", $curentries, $matches)) {
$curentries = $matches[1];
......
......@@ -415,7 +415,7 @@ if ($pkg['tabs'] <> "") {
$addresswithport = getenv("HTTP_HOST");
$colonpos = strpos($addresswithport, ":");
if ($colonpos !== False) {
//my url is actually just the IP address of the pfsense box
//my url is actually just the IP address of the opnsense box
$myurl = substr($addresswithport, 0, $colonpos);
} else {
$myurl = $addresswithport;
......
......@@ -348,7 +348,7 @@ include("head.inc");
<br />
<strong><?=gettext("Maximum number of connections to hold in the firewall state table.");?></strong>
<br />
<span class="vexpl"><?=gettext("Note: Leave this blank for the default. On your system the default size is:");?> <?= pfsense_default_state_size() ?></span>
<span class="vexpl"><?=gettext("Note: Leave this blank for the default. On your system the default size is:");?> <?= default_state_size() ?></span>
</td>
</tr>
<tr>
......@@ -361,7 +361,7 @@ include("head.inc");
<span class="vexpl">
<?=gettext("Note: Leave this blank for the default.");?>
<?php if (empty($pconfig['maximumtableentries'])): ?>
<?= gettext("On your system the default size is:");?> <?= pfsense_default_table_entries_size(); ?>
<?= gettext("On your system the default size is:");?> <?= default_table_entries_size(); ?>
<?php endif; ?>
</span>
</td>
......
......@@ -63,7 +63,7 @@ if (count($wolcomputers) > 0) {
}
echo '<td valign="middle" class="list nowrap">';
/*if($is_active) { */
/* Will always show wake-up button even if pfsense thinks it is awake */
/* Will always show wake-up button even if the code thinks it is awake */
/* } else { */
echo "<a href='services_wol.php?mac={$wolent['mac']}&amp;if={$wolent['interface']}'> ";
echo "<span class='glyphicon glyphicon-flash' title='" . gettext("Wake Up") . "' border='0' alt='wol' ></span></a>\n";
......
......@@ -55,7 +55,7 @@ if(empty($xml)) {
if (file_exists("/usr/local/www/wizards/{$xml}")) {
global $listtags ;
$listtags = array_flip(array('build_port_path', 'depends_on_package', 'onetoone', 'queue', 'rule', 'servernat', 'alias', 'additional_files_needed', 'tab', 'template', 'menu', 'rowhelperfield', 'service', 'step', 'package', 'columnitem', 'option', 'item', 'field', 'package', 'file'));
$pkg = parse_xml_config_raw('/usr/local/www/wizards/' . $xml, 'pfsensewizard', false);
$pkg = parse_xml_config_raw('/usr/local/www/wizards/' . $xml, 'opnsensewizard', false);
} else {
print_info_box_np(sprintf(gettext("ERROR: Could not open %s."), $xml));
die;
......
<?xml version="1.0" encoding="utf-8" ?>
<pfsensewizard>
<opnsensewizard>
<copyright>
/*
Copyright (C) 2014 Deciso B.V.
......@@ -981,4 +981,4 @@
<stepsubmitphpaction>step12_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
</pfsensewizard>
</opnsensewizard>
<?xml version="1.0" encoding="utf-8" ?>
<pfsensewizard>
<opnsensewizard>
<copyright>
/*
Copyright (C) 2014 Deciso B.V.
......@@ -645,4 +645,4 @@
]]>
</description>
</step>
</pfsensewizard>
</opnsensewizard>
<?xml version="1.0"?>
<pfsensewizard>
<opnsensewizard>
<copyright><![CDATA[
/*
Copyright (C) 2014 Deciso B.V.
......@@ -1623,4 +1623,4 @@
<stepsubmitphpaction>step8_stepsubmitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc</includefile>
</step>
</pfsensewizard>
</opnsensewizard>
<?xml version="1.0"?>
<pfsensewizard>
<opnsensewizard>
<copyright><![CDATA[
/*
Copyright (C) Deciso B.V.
......@@ -1631,4 +1631,4 @@
<stepsubmitphpaction>step8_stepsubmitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc</includefile>
</step>
</pfsensewizard>
</opnsensewizard>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment