summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2016-01-12 08:20:45 +0000
committerstilez <stilez@users.noreply.github.com>2016-01-12 08:20:45 +0000
commit7272f6ee407d1d29eaee5a89160b134c991fcf55 (patch)
tree31a84b78a40a70b933930896277daa44bb9f9279 /src
parentf4c114d4a6fcfcd7e69e6a009db683d78d83189d (diff)
downloadpfsense-7272f6ee407d1d29eaee5a89160b134c991fcf55.zip
pfsense-7272f6ee407d1d29eaee5a89160b134c991fcf55.tar.gz
redmine 5702 - change to use high level IPv4 functions where low level ip2long32() etc are used
Diffstat (limited to 'src')
-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..b408953 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