summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-25 18:44:46 +0200
committersmos <seth.mos@dds.nl>2012-06-25 18:44:46 +0200
commit47c48e285b2a6d0e0eaf5c453d90a702eaea5dd4 (patch)
tree1882fc567132453dffac6785109a4d1960cdf797 /etc/inc/openvpn.inc
parenta2beee7597b1ed52961e218deba18caa278337ab (diff)
downloadpfsense-47c48e285b2a6d0e0eaf5c453d90a702eaea5dd4.zip
pfsense-47c48e285b2a6d0e0eaf5c453d90a702eaea5dd4.tar.gz
Check in code that allows for using a gateway group as the interface on the OpenVPN server page. Only allow IPv4 gateway groups for now. We'll need to add IPv6 suppport here later when we import OpenVPN 2.3.
Unbreak the gateway group function on broken configurations like a missing 3G stick. Unbreak the interface IP/IPv6 code in openvpn.inc, we can listen on IPv4 or IPv6, not both. That path is now seperate which should cause less grief down the line. Adds to Redmine ticket #1965 which was for the IPsec failover.
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index b72b709..c41c558 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -334,7 +334,7 @@ function openvpn_reconfigure($mode, $settings) {
$dev_mode = $settings['dev_mode'];
$cipher = $settings['crypto'];
- $interface = $settings['interface'];
+ $interface = get_failover_interface($settings['interface']);
$ipaddr = $settings['ipaddr'];
$ipaddrv6 = $settings['ipaddrv6'];
@@ -343,12 +343,14 @@ function openvpn_reconfigure($mode, $settings) {
// If "any" interface was selected, local directive will be ommited.
if (is_ipaddrv4($ipaddr)) {
$iface_ip=$ipaddr;
- } elseif (is_ipaddrv6($ipaddrv6)) {
- $iface_ipv6=$ipaddrv6;
} else {
if ((!empty($interface)) && (strcmp($interface, "any"))) {
$iface_ip=get_interface_ip($interface);
}
+ }
+ if (is_ipaddrv6($ipaddrv6)) {
+ $iface_ipv6=$ipaddrv6;
+ } else {
if ((!empty($interface)) && (strcmp($interface, "any"))) {
$iface_ipv6=get_interface_ipv6($interface);
}
OpenPOWER on IntegriCloud