summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-03 13:32:25 +0200
committersmos <seth.mos@dds.nl>2012-06-03 13:32:42 +0200
commit6dbffeda7b0f8fe253b413f955ce6f9e795a1cfd (patch)
tree57bd1c0746a8c4db901a547022461a04dbbfd253 /usr
parentbf001dec385b1b733a01ca07fdc9946ae994c63e (diff)
downloadpfsense-6dbffeda7b0f8fe253b413f955ce6f9e795a1cfd.zip
pfsense-6dbffeda7b0f8fe253b413f955ce6f9e795a1cfd.tar.gz
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
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_gateway_groups_edit.php5
-rwxr-xr-xusr/local/www/vpn_ipsec.php11
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php13
3 files changed, 29 insertions, 0 deletions
diff --git a/usr/local/www/system_gateway_groups_edit.php b/usr/local/www/system_gateway_groups_edit.php
index 85e6e91..9677edd 100755
--- a/usr/local/www/system_gateway_groups_edit.php
+++ b/usr/local/www/system_gateway_groups_edit.php
@@ -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();
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php
index 4864e66..c6d6be8 100755
--- a/usr/local/www/vpn_ipsec.php
+++ b/usr/local/www/vpn_ipsec.php
@@ -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
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index 83d1d62..ae62a47 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -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"; ?>>
OpenPOWER on IntegriCloud