diff options
author | Chris Buechler <cmb@pfsense.org> | 2014-11-19 19:10:29 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2014-11-19 19:10:29 -0600 |
commit | 687ff78c96938e1bc6175b293e83079abdb704a4 (patch) | |
tree | 1438208bcbdb0dcdfd39fd0b87434488a7207f5d | |
parent | 355c2f8bdb3e99dab54bc6aef748587365704786 (diff) | |
download | pfsense-687ff78c96938e1bc6175b293e83079abdb704a4.zip pfsense-687ff78c96938e1bc6175b293e83079abdb704a4.tar.gz |
Only skip tap-type OpenVPN servers, not all. Fixes #3713
-rw-r--r-- | etc/inc/gwlb.inc | 32 |
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"; |