diff options
Diffstat (limited to 'src/etc')
-rw-r--r-- | src/etc/inc/openvpn.inc | 6 |
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"; } } |