summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-13 09:48:45 -0200
committerRenato Botelho <renato@netgate.com>2016-01-13 09:48:45 -0200
commitd6edfce5a7fb3b49ffc1964dae9cd518146e8f30 (patch)
tree3e58a6e57a4f7067ebd402feb6cc9e1fcc6681e8 /src/etc
parentd90598ce9fe7c7a99e5c390402d2260ff056d9c6 (diff)
parent493e68074ab2b1f3e90c1e42e63ffa161888222d (diff)
downloadpfsense-d6edfce5a7fb3b49ffc1964dae9cd518146e8f30.zip
pfsense-d6edfce5a7fb3b49ffc1964dae9cd518146e8f30.tar.gz
Merge pull request #2406 from stilez/patch-9
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/openvpn.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc
index 9dc83c5..c7810a6 100644
--- a/src/etc/inc/openvpn.inc
+++ b/src/etc/inc/openvpn.inc
@@ -1243,9 +1243,9 @@ function openvpn_resync_csc(& $settings) {
$csc_conf .= "ifconfig-push {$ip} " . gen_subnet_mask($mask) . "\n";
} else {
/* Because this is being pushed, the order from the client's point of view. */
- $baselong = ip2long32($ip) & gen_subnet_mask_long($mask);
- $serverip = long2ip32($baselong + 1);
- $clientip = long2ip32($baselong + 2);
+ $baselong = gen_subnetv4($ip, $mask);
+ $serverip = ip_after($baselong, 1);
+ $clientip = ip_after($baselong, 2);
$csc_conf .= "ifconfig-push {$clientip} {$serverip}\n";
}
}
OpenPOWER on IntegriCloud