summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-21 09:31:54 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-21 09:31:54 +0100
commit89ac17e3386d81196f0515107a73894b43a96493 (patch)
tree4520560a46d7290fae7779584d159b8faca7cc78 /etc/inc
parent94efc59dffd34a519a63ec53406f2f9c7420cfce (diff)
downloadpfsense-89ac17e3386d81196f0515107a73894b43a96493.zip
pfsense-89ac17e3386d81196f0515107a73894b43a96493.tar.gz
Ticket #4254 specify the list of interfaces to be used by charon. This is a workaround for now. Being investigated the fix.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/vpn.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 4da9e63..28ab10f 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -171,6 +171,7 @@ function vpn_ipsec_configure($ipchg = false)
$listeniflist = array();
$aggressive_mode_psk = false;
unset($iflist);
+ $ifacesuse = array();
if (is_array($a_phase1) && count($a_phase1)) {
$ipsecpinghosts = "";
@@ -179,6 +180,8 @@ function vpn_ipsec_configure($ipchg = false)
if (isset($ph1ent['disabled']))
continue;
+ $ifacesuse[] = get_real_interface($ph1ent['interface']);
+
if ($ph1ent['mode'] == "aggressive" && ($ph1ent['authentication_method'] == "pre_shared_key" || $ph1ent['authentication_method'] == "xauth_psk_server"))
$aggressive_mode_psk = true;
@@ -291,6 +294,11 @@ function vpn_ipsec_configure($ipchg = false)
if (isset($config['ipsec']['unityplugin']))
$unity_enabled = 'no';
+ if (!empty($ifacesuse))
+ $ifacesuse = 'interfaces_use = ' . implode(',', $ifacesuse);
+ else
+ $ifacesuse = '';
+
$strongswan = <<<EOD
# Automatically generated config file - DO NOT MODIFY. Changes will be overwritten.
@@ -308,6 +316,7 @@ install_routes = no
{$i_dont_care_about_security_and_use_aggressive_mode_psk}
{$accept_unencrypted}
cisco_unity = {$unity_enabled}
+{$ifacesuse}
# And two loggers using syslog. The subsections define the facility to log
# to, currently one of: daemon, auth.
OpenPOWER on IntegriCloud