summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_l2tp.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/vpn_l2tp.php')
-rw-r--r--usr/local/www/vpn_l2tp.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/vpn_l2tp.php b/usr/local/www/vpn_l2tp.php
index 025e30f..2b61209 100644
--- a/usr/local/www/vpn_l2tp.php
+++ b/usr/local/www/vpn_l2tp.php
@@ -95,11 +95,11 @@ if ($_POST) {
if (!$input_errors) {
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['l2tp_subnet']);
- $subnet_start = ip2long($_POST['remoteip']);
- $subnet_end = ip2long($_POST['remoteip']) + $_POST['n_l2tp_units'] - 1;
+ $subnet_start = ip2ulong($_POST['remoteip']);
+ $subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_l2tp_units'] - 1;
- if ((ip2long($_POST['localip']) >= $subnet_start) &&
- (ip2long($_POST['localip']) <= $subnet_end)) {
+ if ((ip2ulong($_POST['localip']) >= $subnet_start) &&
+ (ip2ulong($_POST['localip']) <= $subnet_end)) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip("lan")) {
OpenPOWER on IntegriCloud