summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-11-09 12:48:38 -0500
committerjim-p <jimp@pfsense.org>2011-11-09 12:48:38 -0500
commit74a556a3caa67adb0adac055ffb9321e264e1b71 (patch)
tree8bf1a9a39e7c117d4209a58f8a136136b35d7efe /etc/inc/openvpn.inc
parent1ab6bdb5ffcf052241f58af87efef9fe077b38c7 (diff)
downloadpfsense-74a556a3caa67adb0adac055ffb9321e264e1b71.zip
pfsense-74a556a3caa67adb0adac055ffb9321e264e1b71.tar.gz
Rework this a little since using tap+tunnel network is valid, but using tap+tunnel network+bridging is not (will not do what the user expects/wants)
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index ab30200..8fa358f 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -409,12 +409,12 @@ function openvpn_reconfigure($mode, $settings) {
// If the CIDR is less than a /30, OpenVPN will complain if you try to
// use the server directive. It works for a single client without it.
// See ticket #1417
- if (($settings['dev_mode'] != "tap") && ($cidr < 30)) {
+ if (!empty($ip) && !empty($mask) && ($cidr < 30)) {
$conf .= "server {$ip} {$mask}\n";
$conf .= "client-config-dir {$g['varetc_path']}/openvpn-csc\n";
}
case 'p2p_shared_key':
- if ($settings['dev_mode'] != "tap") {
+ if (!empty($ip) && !empty($mask)) {
$baselong = ip2long32($ip) & ip2long($mask);
$ip1 = long2ip32($baselong + 1);
$ip2 = long2ip32($baselong + 2);
@@ -424,7 +424,7 @@ function openvpn_reconfigure($mode, $settings) {
case 'server_tls':
case 'server_user':
case 'server_tls_user':
- if ($settings['dev_mode'] != "tap") {
+ if (!empty($ip) && !empty($mask)) {
$conf .= "server {$ip} {$mask}\n";
if(is_ipaddr($ipv6))
$conf .= "server-ipv6 {$ipv6}/{$prefix}\n";
OpenPOWER on IntegriCloud