diff options
author | jim-p <jimp@pfsense.org> | 2011-11-10 12:01:58 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-11-10 12:02:41 -0500 |
commit | 035c557316e9089f80d02e83e4b739dd595efb65 (patch) | |
tree | 824735840fb266d78aa5e7a0f26123b92830067a | |
parent | 77a888140bd834514e199757f38656cc0ab0ee94 (diff) | |
download | pfsense-035c557316e9089f80d02e83e4b739dd595efb65.zip pfsense-035c557316e9089f80d02e83e4b739dd595efb65.tar.gz |
Fix order of client/server IPs and add a note, and clarify variable names. Fixes #2004.
-rw-r--r-- | etc/inc/openvpn.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc index c9e5975..777b395 100644 --- a/etc/inc/openvpn.inc +++ b/etc/inc/openvpn.inc @@ -687,9 +687,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); |