mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge branch 'master' into Code-Style-etc-inc-vwx3
Conflicts: etc/inc/vpn.inc
This commit is contained in:
commit
04e95a18ed
@ -41,6 +41,7 @@
|
||||
<webgui>
|
||||
<protocol>https</protocol>
|
||||
<loginautocomplete/>
|
||||
<beast_protection//>
|
||||
</webgui>
|
||||
<disablenatreflection>yes</disablenatreflection>
|
||||
<disablesegmentationoffloading/>
|
||||
|
||||
@ -309,9 +309,7 @@ function filter_configure_sync($delete_states_if_needed = true) {
|
||||
|
||||
if (!empty($config['system']['adaptivestart']) && !empty($config['system']['adaptiveend'])) {
|
||||
$limitrules .= "set timeout { adaptive.start {$config['system']['adaptivestart']}, adaptive.end {$config['system']['adaptiveend']} }\n";
|
||||
} else {
|
||||
$limitrules .= "set timeout { adaptive.start 0, adaptive.end 0 }\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['system']['maximumstates'] <> "" && is_numeric($config['system']['maximumstates'])) {
|
||||
/* User defined maximum states in Advanced menu. */
|
||||
|
||||
@ -843,13 +843,13 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
|
||||
if (($gwsttng['ipprotocol'] == $ipprotocol) && isset($gwsttng['defaultgw'])) {
|
||||
$dfltgwfound = true;
|
||||
$dfltgwname = $gwname;
|
||||
if (!isset($gwsttng['monitor_disable']) && stristr($gateways_status[$gwname]['status'], "down")) {
|
||||
if (!isset($gwsttng['monitor_disable']) && $gateways_status[$gwname]['status'] != "none") {
|
||||
$dfltgwdown = true;
|
||||
}
|
||||
}
|
||||
/* Keep a record of the last up gateway */
|
||||
/* XXX: Blacklist lan for now since it might cause issues to those who have a gateway set for it */
|
||||
if (empty($upgw) && ($gwsttng['ipprotocol'] == $ipprotocol) && (isset($gwsttng['monitor_disable']) || !stristr($gateways_status[$gwname]['status'], "down")) && $gwsttng[$gwname]['friendlyiface'] != "lan") {
|
||||
if (empty($upgw) && ($gwsttng['ipprotocol'] == $ipprotocol) && (isset($gwsttng['monitor_disable']) || $gateways_status[$gwname]['status'] == "none") && $gwsttng[$gwname]['friendlyiface'] != "lan") {
|
||||
$upgw = $gwname;
|
||||
}
|
||||
if ($dfltgwdown == true && !empty($upgw)) {
|
||||
@ -1249,4 +1249,4 @@ function gateway_is_gwgroup_member($name) {
|
||||
|
||||
return $members;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
@ -2273,11 +2273,19 @@ EOD;
|
||||
}
|
||||
|
||||
if (isset($config['snmpd']['modules']['hostres'])) {
|
||||
$snmpdconf .= <<<EOD
|
||||
/* XXX: hostres module crashes APU - ticket #4403 */
|
||||
$specplatform = system_identify_specific_platform();
|
||||
if ($specplatform['name'] == 'APU') {
|
||||
log_error("'Host Resources' SNMP module was ignored because it can potentially crash system on APU boards");
|
||||
} else {
|
||||
$snmpdconf .= <<<EOD
|
||||
begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
|
||||
|
||||
EOD;
|
||||
}
|
||||
unset($specplatform);
|
||||
}
|
||||
|
||||
if (isset($config['snmpd']['modules']['bridge'])) {
|
||||
$snmpdconf .= <<<EOD
|
||||
begemotSnmpdModulePath."bridge" = "/usr/lib/snmp_bridge.so"
|
||||
|
||||
@ -1475,11 +1475,13 @@ EOD;
|
||||
fclose($fd);
|
||||
}
|
||||
|
||||
// where ssl.cipher-list is set, this is automatically enabled, but set it explicitly anyway.
|
||||
$lighty_config .= "ssl.honor-cipher-order = \"enable\"\n";
|
||||
|
||||
if (isset($config['system']['webgui']['beast_protection'])) {
|
||||
$lighty_config .= "ssl.honor-cipher-order = \"enable\"\n";
|
||||
$lighty_config .= "ssl.cipher-list = \"ECDHE-RSA-AES256-SHA384:AES256-SHA256:HIGH:!MD5:!aNULL:!EDH:!AESGCM\"\n";
|
||||
} else {
|
||||
$lighty_config .= "ssl.cipher-list = \"DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:CAMELLIA256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:CAMELLIA128-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:!aNULL:!eNULL:!3DES:@STRENGTH\"\n";
|
||||
$lighty_config .= "ssl.cipher-list = \"AES128+EECDH:AES256+EECDH:AES128+EDH:AES256+EDH:AES128-SHA:AES256-SHA:!aNULL:!eNULL:!DSS\"\n";
|
||||
}
|
||||
|
||||
if (!(empty($ca) || (strlen(trim($ca)) == 0))) {
|
||||
|
||||
@ -98,7 +98,7 @@ function vpn_ipsec_convert_to_modp($index)
|
||||
|
||||
function vpn_ipsec_configure($restart = false)
|
||||
{
|
||||
global $config, $g, $sa, $sn, $p1_ealgos, $p2_ealgos;
|
||||
global $config, $g, $sa, $sn, $p1_ealgos, $p2_ealgos, $ipsec_idhandling;
|
||||
|
||||
if ($g['platform'] == 'jail') {
|
||||
return;
|
||||
@ -342,8 +342,12 @@ function vpn_ipsec_configure($restart = false)
|
||||
$unity_enabled = 'no';
|
||||
}
|
||||
|
||||
if (!empty($ifacesuse)) {
|
||||
$ifacesuse = 'interfaces_use = ' . implode(',', array_unique($ifacesuse));
|
||||
if (isset($config['ipsec']['enableinterfacesuse'])) {
|
||||
if (!empty($ifacesuse)) {
|
||||
$ifacesuse = 'interfaces_use = ' . implode(',', array_unique($ifacesuse));
|
||||
} else {
|
||||
$ifacesuse = '';
|
||||
}
|
||||
} else {
|
||||
$ifacesuse = '';
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ include("head.inc"); ?>
|
||||
<?=$mandfldhtml;?>
|
||||
<table summary="results">
|
||||
<tr><td valign="top">
|
||||
<input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>" />
|
||||
<input name="host" type="text" class="formfld unknown" id="host" size="20" value="<?=htmlspecialchars($host);?>" />
|
||||
</td>
|
||||
<?php if ($resolved && $type) { ?>
|
||||
<td valign="middle"> = </td><td>
|
||||
|
||||
@ -99,7 +99,7 @@ include("head.inc"); ?>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Host"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="host" type="text" class="formfldunknown" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
|
||||
<?=$mandfldhtml;?><input name="host" type="text" class="formfld unknown" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP Protocol"); ?></td>
|
||||
|
||||
@ -112,18 +112,18 @@ include("head.inc"); ?>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Host"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?>
|
||||
<input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
|
||||
<input name="host" type="text" class="formfld unknown" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?= gettext("Port"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="port" type="text" class="formfld" id="port" size="10" value="<?=htmlspecialchars($port);?>" />
|
||||
<input name="port" type="text" class="formfld unknown" id="port" size="10" value="<?=htmlspecialchars($port);?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?= gettext("Source Port"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="srcport" type="text" class="formfld" id="srcport" size="10" value="<?=htmlspecialchars($srcport);?>" />
|
||||
<input name="srcport" type="text" class="formfld unknown" id="srcport" size="10" value="<?=htmlspecialchars($srcport);?>" />
|
||||
<br /><br /><?php echo gettext("This should typically be left blank."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -99,7 +99,7 @@ if (!isset($do_traceroute)) {
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Host");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
|
||||
<?=$mandfldhtml;?><input name="host" type="text" class="formfld unknown" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP Protocol"); ?></td>
|
||||
|
||||
@ -335,7 +335,7 @@ if ($input_errors)
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("External subnet IP"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="external" type="text" class="formfld" id="external" size="20" value="<?=htmlspecialchars($pconfig['external']);?>" />
|
||||
<input name="external" type="text" class="formfld unknown" id="external" size="20" value="<?=htmlspecialchars($pconfig['external']);?>" />
|
||||
<br />
|
||||
<span class="vexpl">
|
||||
<?=gettext("Enter the external (usually on a WAN) subnet's starting address for the 1:1 mapping. " .
|
||||
|
||||
@ -114,8 +114,8 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) {
|
||||
$pconfig['ptpid'] = $a_ppps[$pppid]['ptpid'];
|
||||
$pconfig['port'] = $a_ppps[$pppid]['ports'];
|
||||
if ($a_ppps[$pppid]['type'] == "ppp") {
|
||||
$pconfig['username'] = $a_ppps[$pppid]['username'];
|
||||
$pconfig['password'] = base64_decode($a_ppps[$pppid]['password']);
|
||||
$pconfig['ppp_username'] = $a_ppps[$pppid]['username'];
|
||||
$pconfig['ppp_password'] = base64_decode($a_ppps[$pppid]['password']);
|
||||
|
||||
$pconfig['phone'] = $a_ppps[$pppid]['phone'];
|
||||
$pconfig['apn'] = $a_ppps[$pppid]['apn'];
|
||||
@ -522,9 +522,6 @@ if ($_POST['apply']) {
|
||||
$input_errors[] = gettext("This interface is referenced by IPv4 VIPs. Please delete those before setting the interface to 'none' configuration.");
|
||||
}
|
||||
}
|
||||
case "dhcp":
|
||||
if (in_array($wancfg['ipaddr'], array("ppp", "pppoe", "pptp", "l2tp")))
|
||||
$input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."),$_POST['type']);
|
||||
break;
|
||||
case "ppp":
|
||||
$reqdfields = explode(" ", "port phone");
|
||||
@ -575,6 +572,7 @@ if ($_POST['apply']) {
|
||||
$input_errors[] = gettext("This interface is referenced by IPv6 VIPs. Please delete those before setting the interface to 'none' configuration.");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "dhcp6":
|
||||
if (in_array($wancfg['ipaddrv6'], array()))
|
||||
$input_errors[] = sprintf(gettext("You have to reassign the interface to be able to configure as %s."),$_POST['type6']);
|
||||
@ -984,8 +982,8 @@ if ($_POST['apply']) {
|
||||
$a_ppps[$pppid]['type'] = $_POST['type'];
|
||||
$a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid'];
|
||||
$a_ppps[$pppid]['ports'] = $_POST['port'];
|
||||
$a_ppps[$pppid]['username'] = $_POST['username'];
|
||||
$a_ppps[$pppid]['password'] = base64_encode($_POST['password']);
|
||||
$a_ppps[$pppid]['username'] = $_POST['ppp_username'];
|
||||
$a_ppps[$pppid]['password'] = base64_encode($_POST['ppp_password']);
|
||||
$a_ppps[$pppid]['phone'] = $_POST['phone'];
|
||||
$a_ppps[$pppid]['apn'] = $_POST['apn'];
|
||||
$wancfg['if'] = $_POST['type'] . $_POST['ptpid'];
|
||||
@ -1599,8 +1597,8 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
|
||||
success: function(data,textStatus,response) {
|
||||
var xmldoc = response.responseXML;
|
||||
var provider = xmldoc.getElementsByTagName('connection')[0];
|
||||
jQuery('#username').val('');
|
||||
jQuery('#password').val('');
|
||||
jQuery('#ppp_username').val('');
|
||||
jQuery('#ppp_password').val('');
|
||||
if(provider.getElementsByTagName('apn')[0].firstChild.data == "CDMA") {
|
||||
jQuery('#phone').val('#777');
|
||||
jQuery('#apn').val('');
|
||||
@ -1608,10 +1606,10 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
|
||||
jQuery('#phone').val('*99#');
|
||||
jQuery('#apn').val(provider.getElementsByTagName('apn')[0].firstChild.data);
|
||||
}
|
||||
username = provider.getElementsByTagName('username')[0].firstChild.data;
|
||||
password = provider.getElementsByTagName('password')[0].firstChild.data;
|
||||
jQuery('#username').val(username);
|
||||
jQuery('#password').val(password);
|
||||
ppp_username = provider.getElementsByTagName('ppp_username')[0].firstChild.data;
|
||||
ppp_password = provider.getElementsByTagName('ppp_password')[0].firstChild.data;
|
||||
jQuery('#ppp_username').val(ppp_username);
|
||||
jQuery('#ppp_password').val(ppp_password);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -2617,13 +2615,13 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Username"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
|
||||
<input name="ppp_username" type="text" class="formfld user" id="ppp_username" size="20" value="<?=htmlspecialchars($pconfig['ppp_username']);?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
||||
<input name="ppp_password" type="password" class="formfld pwd" id="ppp_password" size="20" value="<?=htmlspecialchars($pconfig['ppp_password']);?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="phone_num">
|
||||
|
||||
@ -195,10 +195,10 @@ if ($_POST) {
|
||||
break;
|
||||
case "pppoe":
|
||||
if ($_POST['ondemand']) {
|
||||
$reqdfields = explode(" ", "interfaces username password ondemand idletimeout");
|
||||
$reqdfields = explode(" ", "interfaces username passwordfld ondemand idletimeout");
|
||||
$reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Dial on demand"),gettext("Idle timeout value"));
|
||||
} else {
|
||||
$reqdfields = explode(" ", "interfaces username password");
|
||||
$reqdfields = explode(" ", "interfaces username passwordfld");
|
||||
$reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"));
|
||||
}
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
@ -206,10 +206,10 @@ if ($_POST) {
|
||||
case "l2tp":
|
||||
case "pptp":
|
||||
if ($_POST['ondemand']) {
|
||||
$reqdfields = explode(" ", "interfaces username password localip subnet gateway ondemand idletimeout");
|
||||
$reqdfields = explode(" ", "interfaces username passwordfld localip subnet gateway ondemand idletimeout");
|
||||
$reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Local IP address"),gettext("Subnet"),gettext("Remote IP address"),gettext("Dial on demand"),gettext("Idle timeout value"));
|
||||
} else {
|
||||
$reqdfields = explode(" ", "interfaces username password localip subnet gateway");
|
||||
$reqdfields = explode(" ", "interfaces username passwordfld localip subnet gateway");
|
||||
$reqdfieldsn = array(gettext("Link Interface(s)"),gettext("Username"),gettext("Password"),gettext("Local IP address"),gettext("Subnet"),gettext("Remote IP address"));
|
||||
}
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
@ -276,7 +276,7 @@ if ($_POST) {
|
||||
$ppp['if'] = $ppp['type'].$ppp['ptpid'];
|
||||
$ppp['ports'] = implode(',',$_POST['interfaces']);
|
||||
$ppp['username'] = $_POST['username'];
|
||||
$ppp['password'] = base64_encode($_POST['password']);
|
||||
$ppp['password'] = base64_encode($_POST['passwordfld']);
|
||||
$ppp['ondemand'] = $_POST['ondemand'] ? true : false;
|
||||
if (!empty($_POST['idletimeout']))
|
||||
$ppp['idletimeout'] = $_POST['idletimeout'];
|
||||
@ -528,7 +528,7 @@ $types = array("select" => gettext("Select"), "ppp" => "PPP", "pppoe" => "PPPoE"
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?= gettext("Password"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
||||
<input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ if ($_POST) {
|
||||
if ($pconfig['type'] != "custom" && $pconfig['type'] != "custom-v6") {
|
||||
$reqdfields[] = "host";
|
||||
$reqdfieldsn[] = gettext("Hostname");
|
||||
$reqdfields[] = "password";
|
||||
$reqdfields[] = "passwordfld";
|
||||
$reqdfieldsn[] = gettext("Password");
|
||||
$reqdfields[] = "username";
|
||||
$reqdfieldsn[] = gettext("Username");
|
||||
@ -133,7 +133,7 @@ if ($_POST) {
|
||||
$dyndns = array();
|
||||
$dyndns['type'] = $_POST['type'];
|
||||
$dyndns['username'] = $_POST['username'];
|
||||
$dyndns['password'] = $_POST['password'];
|
||||
$dyndns['password'] = $_POST['passwordfld'];
|
||||
$dyndns['host'] = $_POST['host'];
|
||||
$dyndns['mx'] = $_POST['mx'];
|
||||
$dyndns['wildcard'] = $_POST['wildcard'] ? true : false;
|
||||
@ -370,7 +370,7 @@ function _onTypeChange(type){
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
||||
<input name="passwordfld" type="password" class="formfld pwd" id="passwordfld" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
|
||||
<br />
|
||||
<?=gettext("FreeDNS (freedns.afraid.org): Enter your \"Authentication Token\" provided by FreeDNS.");?>
|
||||
<br /><?= gettext("Route 53: Enter your Secret Access Key.");?>
|
||||
|
||||
@ -188,7 +188,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Server");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="server" type="text" class="formfld" id="server" size="30" value="<?=htmlspecialchars($pconfig['server'])?>" />
|
||||
<input name="server" type="text" class="formfld unknown" id="server" size="30" value="<?=htmlspecialchars($pconfig['server'])?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -425,8 +425,8 @@ function enable_change(whichone) {
|
||||
if ($lip == $pconfig['bindip'])
|
||||
$selected = "selected=\"selected\"";
|
||||
?>
|
||||
<option value="<?=$ldescr;?>" <?=$selected;?>>
|
||||
<?=htmlspecialchars($lip['name']);?>
|
||||
<option value="<?=$lip;?>" <?=$selected;?>>
|
||||
<?=htmlspecialchars($ldescr);?>
|
||||
</option>
|
||||
<?php endforeach;
|
||||
unset($listenips);
|
||||
|
||||
@ -215,7 +215,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Host");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="host" type="text" class="formfld" id="host" size="40" value="<?=htmlspecialchars($pconfig['host']);?>" /><br />
|
||||
<input name="host" type="text" class="formfld unknown" id="host" size="40" value="<?=htmlspecialchars($pconfig['host']);?>" /><br />
|
||||
<span class="vexpl"><?=gettext("Name of the host, without domain part"); ?><br />
|
||||
<?=gettext("e.g."); ?> <em><?=gettext("myhost"); ?></em></span>
|
||||
</td>
|
||||
@ -223,7 +223,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="domain" type="text" class="formfld" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>" /><br />
|
||||
<input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>" /><br />
|
||||
<span class="vexpl"><?=gettext("Domain of the host"); ?><br />
|
||||
<?=gettext("e.g."); ?> <em><?=gettext("example.com"); ?></em></span>
|
||||
</td>
|
||||
@ -231,7 +231,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="ip" type="text" class="formfld" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>" /><br />
|
||||
<input name="ip" type="text" class="formfld unknown" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>" /><br />
|
||||
<span class="vexpl"><?=gettext("IP address of the host"); ?><br />
|
||||
<?=gettext("e.g."); ?> <em>192.168.100.100</em> <?=gettext("or"); ?> <em>fd00:abcd::1</em></span>
|
||||
</td>
|
||||
@ -239,7 +239,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" /><br />
|
||||
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" /><br />
|
||||
<span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed).");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -143,7 +143,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="mac" type="text" class="formfld" id="mac" size="20" value="<?=htmlspecialchars($pconfig['mac']);?>" />
|
||||
<input name="mac" type="text" class="formfld unknown" id="mac" size="20" value="<?=htmlspecialchars($pconfig['mac']);?>" />
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
|
||||
"xx:xx:xx:xx:xx:xx");?></span></td>
|
||||
@ -151,7 +151,7 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<br /> <span class="vexpl"><?=gettext("You may enter a description here".
|
||||
" for your reference (not parsed).");?></span></td>
|
||||
</tr>
|
||||
|
||||
@ -568,9 +568,9 @@ function get_dates($curperiod, $graph) {
|
||||
$end_fmt = strftime("%m/%d/%Y %H:%M:%S", $end);
|
||||
?>
|
||||
<?=gettext("Start:");?>
|
||||
<input id="startDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="start" class="formfldunknown" size="24" value="<?= htmlentities($start_fmt); ?>" />
|
||||
<input id="startDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="start" class="formfld unknown" size="24" value="<?= htmlentities($start_fmt); ?>" />
|
||||
<?=gettext("End:");?>
|
||||
<input id="endDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="end" class="formfldunknown" size="24" value="<?= htmlentities($end_fmt); ?>" />
|
||||
<input id="endDateTime" title="<?= htmlentities($tz_msg); ?>." type="text" name="end" class="formfld unknown" size="24" value="<?= htmlentities($end_fmt); ?>" />
|
||||
<input type="submit" name="Submit" value="<?=gettext("Go"); ?>" />
|
||||
</td></tr>
|
||||
<?php
|
||||
|
||||
@ -366,7 +366,7 @@ function update_description(itemnum) {
|
||||
<input name="adaptiveend" type="text" id="adaptiveend" value="<?php echo $pconfig['adaptiveend']; ?>" />
|
||||
<br /><?=gettext("When reaching this number of state entries, all timeout values become zero, effectively purging all state entries immediately. This value is used to define the scale factor, it should not actually be reached (set a lower state limit, see below).");?>
|
||||
<br />
|
||||
<span class="vexpl"><?=gettext("Note: Leave this blank for the default(0).");?></span>
|
||||
<span class="vexpl"><?=gettext("Note: Leave this blank for the default, which auto-calculates these values from your maximum state table size. Adaptive start is 60% and end is 120% of the state table size by default.");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -47,6 +47,7 @@ foreach ($ipsec_loglevels as $lkey => $ldescr) {
|
||||
}
|
||||
$pconfig['unityplugin'] = isset($config['ipsec']['unityplugin']);
|
||||
$pconfig['compression'] = isset($config['ipsec']['compression']);
|
||||
$pconfig['enableinterfacesuse'] = isset($config['ipsec']['enableinterfacesuse']);
|
||||
$pconfig['acceptunencryptedmainmode'] = isset($config['ipsec']['acceptunencryptedmainmode']);
|
||||
$pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']);
|
||||
$pconfig['maxmss'] = $config['system']['maxmss'];
|
||||
@ -134,6 +135,15 @@ if ($_POST) {
|
||||
$needsrestart = true;
|
||||
unset($config['ipsec']['compression']);
|
||||
}
|
||||
|
||||
if($_POST['enableinterfacesuse'] == "yes") {
|
||||
if (!isset($config['ipsec']['enableinterfacesuse']))
|
||||
$needsrestart = true;
|
||||
$config['ipsec']['enableinterfacesuse'] = true;
|
||||
} elseif (isset($config['ipsec']['enableinterfacesuse'])) {
|
||||
$needsrestart = true;
|
||||
unset($config['ipsec']['enableinterfacesuse']);
|
||||
}
|
||||
|
||||
if($_POST['unityplugin'] == "yes") {
|
||||
if (!isset($config['ipsec']['unityplugin']))
|
||||
@ -295,6 +305,15 @@ function maxmss_checked(obj) {
|
||||
<?=gettext("IPComp compression of content is proposed on the connection."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Strict interface binding"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<input name="enableinterfacesuse" type="checkbox" id="enableinterfacesuse" value="yes" <?php if ($pconfig['enableinterfacesuse']) echo "checked=\"checked\""; ?> />
|
||||
<strong><?=gettext("Enable strict interface binding"); ?></strong>
|
||||
<br />
|
||||
<?=gettext("Enable strongSwan's interfaces_use option to bind specific interfaces only. This option is known to break IPsec with dynamic IP interfaces. This is not recommended at this time."); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncell"><?=gettext("Unencrypted payloads in IKEv1 Main Mode"); ?></td>
|
||||
<td width="78%" class="vtable">
|
||||
|
||||
@ -78,7 +78,7 @@ if ($_POST) {
|
||||
$reqdfields = explode(" ", "username");
|
||||
$reqdfieldsn = array(gettext("Username"));
|
||||
} else {
|
||||
$reqdfields = explode(" ", "username password");
|
||||
$reqdfields = explode(" ", "username passwordfld1");
|
||||
$reqdfieldsn = array(gettext("Username"),gettext("Password"));
|
||||
}
|
||||
|
||||
@ -87,13 +87,13 @@ if ($_POST) {
|
||||
if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['username']))
|
||||
$input_errors[] = gettext("The username contains invalid characters.");
|
||||
|
||||
if (preg_match("/^!/", $_POST['password']))
|
||||
if (preg_match("/^!/", $_POST['passwordfld1']))
|
||||
$input_errors[] = gettext("The password cannot start with '!'.");
|
||||
|
||||
if (!preg_match("/^[\x20-\x7E]*$/", $_POST['password']))
|
||||
if (!preg_match("/^[\x20-\x7E]*$/", $_POST['passwordfld1']))
|
||||
$input_errors[] = gettext("The password contains invalid characters.");
|
||||
|
||||
if (($_POST['password']) && ($_POST['password'] != $_POST['password2'])) {
|
||||
if (($_POST['passwordfld1']) && ($_POST['passwordfld1'] != $_POST['passwordfld2'])) {
|
||||
$input_errors[] = gettext("The passwords do not match.");
|
||||
}
|
||||
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
|
||||
@ -118,8 +118,8 @@ if ($_POST) {
|
||||
$secretent['name'] = $_POST['username'];
|
||||
$secretent['ip'] = $_POST['ip'];
|
||||
|
||||
if ($_POST['password'])
|
||||
$secretent['password'] = $_POST['password'];
|
||||
if ($_POST['passwordfld1'])
|
||||
$secretent['password'] = $_POST['passwordfld1'];
|
||||
|
||||
if (isset($id) && $a_secret[$id])
|
||||
$a_secret[$id] = $secretent;
|
||||
@ -155,8 +155,8 @@ include("head.inc");
|
||||
<tr>
|
||||
<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
|
||||
<td width="78%" class="vtable">
|
||||
<?=$mandfldhtml;?><input name="password" type="password" class="formfld pwd" id="password" size="20" />
|
||||
<br /><?=$mandfldhtml;?><input name="password2" type="password" class="formfld pwd" id="password2" size="20" />
|
||||
<?=$mandfldhtml;?><input name="passwordfld1" type="password" class="formfld pwd" id="passwordfld1" size="20" />
|
||||
<br /><?=$mandfldhtml;?><input name="passwordfld2" type="password" class="formfld pwd" id="passwordfld2" size="20" />
|
||||
(<?=gettext("confirmation");?>)<?php if (isset($id) && $a_secret[$id]): ?><br />
|
||||
<span class="vexpl"><?=gettext("If you want to change the users' password, ".
|
||||
"enter it here twice.");?></span><?php endif; ?></td>
|
||||
|
||||
@ -489,8 +489,8 @@ function step3_stepsubmitphpaction() {
|
||||
if (!$_POST['enable'])
|
||||
return;
|
||||
|
||||
if($_POST['address']) {
|
||||
if(!is_ipaddroralias($_POST['address'])) {
|
||||
if($_POST['upstream_sip_server']) {
|
||||
if(!is_ipaddroralias($_POST['upstream_sip_server'])) {
|
||||
/* item is not an ip or alias. error out */
|
||||
$savemsg=gettext("Address must be a valid IP address or Firewall Alias. Please correct this value to continue.");
|
||||
$stepid--;
|
||||
@ -555,6 +555,10 @@ function step3_stepsubmitphpaction() {
|
||||
unset($config['ezshaper']['step3']);
|
||||
$config['ezshaper']['step3'] = array();
|
||||
|
||||
if (!empty($_POST['upstream_sip_server']))
|
||||
$config['ezshaper']['step3']['address'] = $_POST['upstream_sip_server'];
|
||||
if ($_POST['enable'] == 'on')
|
||||
$config['ezshaper']['step3']['enable'] = 'on';
|
||||
for ($i = 0; $i < $steps; $i++) {
|
||||
$config['ezshaper']['step3']["local{$i}download"] = $_POST["local{$i}download"];
|
||||
$config['ezshaper']['step3']["local{$i}downloadspeed"] = $_POST["local{$i}downloadspeed"];
|
||||
|
||||
@ -532,8 +532,8 @@ function step3_stepsubmitphpaction() {
|
||||
if (!$_POST['enable'])
|
||||
return;
|
||||
|
||||
if($_POST['address']) {
|
||||
if(!is_ipaddroralias($_POST['address'])) {
|
||||
if($_POST['upstream_sip_server']) {
|
||||
if(!is_ipaddroralias($_POST['upstream_sip_server'])) {
|
||||
/* item is not an ip or alias. error out */
|
||||
$savemsg=gettext("Address must be a valid IP address or Firewall Alias. Please correct this value to continue.");
|
||||
$stepid--;
|
||||
@ -603,6 +603,10 @@ function step3_stepsubmitphpaction() {
|
||||
unset($config['ezshaper']['step3']);
|
||||
$config['ezshaper']['step3'] = array();
|
||||
|
||||
if (!empty($_POST['upstream_sip_server']))
|
||||
$config['ezshaper']['step3']['address'] = $_POST['upstream_sip_server'];
|
||||
if ($_POST['enable'] == 'on')
|
||||
$config['ezshaper']['step3']['enable'] = 'on';
|
||||
for ($i = 0; $i < $localint; $i++) {
|
||||
$config['ezshaper']['step3']["local{$i}download"] = $_POST["local{$i}download"];
|
||||
$config['ezshaper']['step3']["local{$i}downloadspeed"] = $_POST["local{$i}downloadspeed"];
|
||||
|
||||
@ -279,8 +279,12 @@ function restore_config_section_xmlrpc($raw_params) {
|
||||
}
|
||||
}
|
||||
/* Cleanup remaining old carps */
|
||||
foreach ($oldvips as $oldvipif => $oldvippar) {
|
||||
$oldvipif = get_real_interface($oldvippar['interface']);
|
||||
foreach ($oldvips as $oldvipif => $oldvipar) {
|
||||
if (strstr($oldvipar['interface'], '_vip')) {
|
||||
$oldvipif = explode('_vip', $oldvipar['interface']);
|
||||
$oldvipif = $oldvipif[0];
|
||||
} else
|
||||
$oldvipif = get_real_interface($oldvipar['interface']);
|
||||
if (!empty($oldvipif)) {
|
||||
if (is_ipaddrv6($oldvipif))
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($oldvipif) . " inet6 " . escapeshellarg($oldvipar['subnet']) . " delete");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user