mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Add Gateway Group support to the IPsec interface drop down.
Edit of gateway group correctly reflects the new IP Address. We need to make a blacklist for interface names in the gateway group edit page. Redmine ticket #1965
This commit is contained in:
parent
bf001dec38
commit
6dbffeda7b
@ -126,7 +126,7 @@ function ipsec_get_phase1_src(& $ph1ent) {
|
||||
|
||||
if ($ph1ent['interface']) {
|
||||
if (!is_ipaddr($ph1ent['interface'])) {
|
||||
$if = $ph1ent['interface'];
|
||||
$if = get_failover_interface($ph1ent['interface']);
|
||||
if($ph1ent['protocol'] == "inet6") {
|
||||
$interfaceip = get_interface_ipv6($if);
|
||||
} else {
|
||||
|
||||
@ -40,6 +40,8 @@
|
||||
##|-PRIV
|
||||
|
||||
require("guiconfig.inc");
|
||||
require_once("ipsec.inc");
|
||||
require_once("vpn.inc");
|
||||
|
||||
if (!is_array($config['gateways']['gateway_group']))
|
||||
$config['gateways']['gateway_group'] = array();
|
||||
@ -137,6 +139,9 @@ if ($_POST) {
|
||||
services_dnsupdate_process();
|
||||
/* signal dyndns update */
|
||||
services_dyndns_configure();
|
||||
/* update IPsec too */
|
||||
vpn_ipsec_refresh_policies();
|
||||
vpn_ipsec_configure();
|
||||
|
||||
write_config();
|
||||
|
||||
|
||||
@ -189,12 +189,23 @@ include("head.inc");
|
||||
<?php
|
||||
if ($ph1ent['interface']) {
|
||||
$iflabels = get_configured_interface_with_descr();
|
||||
|
||||
$carplist = get_configured_carp_interface_list();
|
||||
foreach ($carplist as $cif => $carpip)
|
||||
$iflabels[$cif] = $carpip." (".get_vip_descr($carpip).")";
|
||||
|
||||
$aliaslist = get_configured_ip_aliases_list();
|
||||
foreach ($aliaslist as $aliasip => $aliasif)
|
||||
$iflabels[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
|
||||
|
||||
$grouplist = return_gateway_groups_array();
|
||||
foreach ($grouplist as $name => $group) {
|
||||
if($group[0]['vip'] <> "")
|
||||
$vipif = $group[0]['vip'];
|
||||
else
|
||||
$vipif = $group[0]['int'];
|
||||
$iflabels[$name] = "GW Group {$name}";
|
||||
}
|
||||
$if = htmlspecialchars($iflabels[$ph1ent['interface']]);
|
||||
}
|
||||
else
|
||||
|
||||
@ -540,12 +540,25 @@ function dpdchkbox_change() {
|
||||
<select name="interface" class="formselect">
|
||||
<?php
|
||||
$interfaces = get_configured_interface_with_descr();
|
||||
|
||||
$carplist = get_configured_carp_interface_list();
|
||||
foreach ($carplist as $cif => $carpip)
|
||||
$interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")";
|
||||
|
||||
$aliaslist = get_configured_ip_aliases_list();
|
||||
foreach ($aliaslist as $aliasip => $aliasif)
|
||||
$interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
|
||||
|
||||
$grouplist = return_gateway_groups_array();
|
||||
foreach ($grouplist as $name => $group) {
|
||||
if($group[0]['vip'] <> "")
|
||||
$vipif = $group[0]['vip'];
|
||||
else
|
||||
$vipif = $group[0]['int'];
|
||||
$interfaces[$name] = "GW Group {$name}";
|
||||
}
|
||||
|
||||
|
||||
foreach ($interfaces as $iface => $ifacename):
|
||||
?>
|
||||
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user