summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-11-19 19:10:29 -0600
committerChris Buechler <cmb@pfsense.org>2014-11-19 19:10:29 -0600
commit687ff78c96938e1bc6175b293e83079abdb704a4 (patch)
tree1438208bcbdb0dcdfd39fd0b87434488a7207f5d /etc/inc/gwlb.inc
parent355c2f8bdb3e99dab54bc6aef748587365704786 (diff)
downloadpfsense-687ff78c96938e1bc6175b293e83079abdb704a4.zip
pfsense-687ff78c96938e1bc6175b293e83079abdb704a4.tar.gz
Only skip tap-type OpenVPN servers, not all. Fixes #3713
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc32
1 files changed, 24 insertions, 8 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 8284266..744dee8 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -563,10 +563,18 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
default:
$tunnelif = substr($ifcfg['if'], 0, 3);
if (substr($ifcfg['if'], 0, 4) == "ovpn") {
- // if current iface is an ovpn server endpoint then skip it
- if (substr($ifcfg['if'], 4, 1) == 's')
- continue 2;
-
+ // if current iface is an ovpn server endpoint then check its type, skip tap only
+ if (substr($ifcfg['if'], 4, 1) == 's') {
+ $ovpnid = substr($ifcfg['if'], 5);
+ if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as & $ovpnserverconf) {
+ if ($ovpnserverconf['vpnid'] == $ovpnid) {
+ if ($ovpnserverconf['dev_mode'] == "tap")
+ continue 3;
+ }
+ }
+ }
+ }
$ctype = "VPNv4";
} else if ($tunnelif == "gif" || $tunnelif == "gre")
$ctype = "TUNNELv4";
@@ -640,10 +648,18 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
default:
$tunnelif = substr($ifcfg['if'], 0, 3);
if (substr($ifcfg['if'], 0, 4) == "ovpn") {
- // if current iface is an ovpn server endpoint then skip it
- if (substr($ifcfg['if'], 4, 1) == 's')
- continue 2;
-
+ // if current iface is an ovpn server endpoint then check its type, skip tap only
+ if (substr($ifcfg['if'], 4, 1) == 's') {
+ $ovpnid = substr($ifcfg['if'], 5);
+ if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as & $ovpnserverconf) {
+ if ($ovpnserverconf['vpnid'] == $ovpnid) {
+ if ($ovpnserverconf['dev_mode'] == "tap")
+ continue 3;
+ }
+ }
+ }
+ }
$ctype = "VPNv6";
} else if ($tunnelif == "gif" || $tunnelif == "gre")
$ctype = "TUNNELv6";
OpenPOWER on IntegriCloud