summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-11-16 15:46:38 -0500
committerjim-p <jimp@pfsense.org>2011-11-16 15:46:38 -0500
commit459e93330b130531f2a59b58b24a9effb8bfa48f (patch)
tree0aae4179acea5f3345698865830c6b0f0bd464c1 /etc/inc/openvpn.inc
parentb422360c35040c2753c6098758dcfea8960f4b38 (diff)
downloadpfsense-459e93330b130531f2a59b58b24a9effb8bfa48f.zip
pfsense-459e93330b130531f2a59b58b24a9effb8bfa48f.tar.gz
If there is a tunnel network in tap mode, the second parameter is a subnet mask, not the other IP.
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index b4de58a..d478c53 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -418,7 +418,10 @@ function openvpn_reconfigure($mode, $settings) {
$baselong = ip2long32($ip) & ip2long($mask);
$ip1 = long2ip32($baselong + 1);
$ip2 = long2ip32($baselong + 2);
- $conf .= "ifconfig $ip1 $ip2\n";
+ if ($settings['dev_mode'] == 'tun')
+ $conf .= "ifconfig {$ip1} {$ip2}\n";
+ else
+ $conf .= "ifconfig {$ip1} {$mask}\n";
}
break;
case 'server_tls':
@@ -562,7 +565,10 @@ function openvpn_reconfigure($mode, $settings) {
$baselong = ip2long32($ip) & ip2long($mask);
$ip1 = long2ip32($baselong + 1);
$ip2 = long2ip32($baselong + 2);
- $conf .= "ifconfig $ip2 $ip1\n";
+ if ($settings['dev_mode'] == 'tun')
+ $conf .= "ifconfig {$ip2} {$ip1}\n";
+ else
+ $conf .= "ifconfig {$ip2} {$mask}\n";
}
if ($settings['proxy_addr']) {
OpenPOWER on IntegriCloud