summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-11-10 12:01:58 -0500
committerjim-p <jimp@pfsense.org>2011-11-10 12:01:58 -0500
commit298fe5ae746d5240a34f66695fd6d70947765929 (patch)
treed4819b762a53706ad22a977737dde0815691186e /etc/inc/openvpn.inc
parent2176219846f5fb5d6eff14fe8d66dd0b3dcdbe0c (diff)
downloadpfsense-298fe5ae746d5240a34f66695fd6d70947765929.zip
pfsense-298fe5ae746d5240a34f66695fd6d70947765929.tar.gz
Fix order of client/server IPs and add a note, and clarify variable names. Fixes #2004.
Diffstat (limited to 'etc/inc/openvpn.inc')
-rw-r--r--etc/inc/openvpn.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 8fa358f..f94967c 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -726,9 +726,10 @@ function openvpn_resync_csc(& $settings) {
if (!empty($settings['tunnel_network'])) {
list($ip, $mask) = explode('/', $settings['tunnel_network']);
$baselong = ip2long32($ip) & gen_subnet_mask_long($mask);
- $ip1 = long2ip32($baselong + 1);
- $ip2 = long2ip32($baselong + 2);
- $conf .= "ifconfig-push {$ip1} {$ip2}\n";
+ $serverip = long2ip32($baselong + 1);
+ $clientip = long2ip32($baselong + 2);
+ /* Because this is being pushed, the order from the client's point of view. */
+ $conf .= "ifconfig-push {$clientip} {$serverip}\n";
}
openvpn_add_dhcpopts($settings, $conf);
OpenPOWER on IntegriCloud