From 9603306327f07205ac69ea99b8c0666ba9dc8a1d Mon Sep 17 00:00:00 2001 From: Erik Fonnesbeck Date: Thu, 20 May 2010 10:48:39 -0600 Subject: Various fixes to usage of ip2long, long2ip, and negated subnet masks, mostly affecting 64-bit. Ticket #459 --- usr/local/www/vpn_pptp.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr/local/www/vpn_pptp.php') diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php index 5aae209..1c88670 100755 --- a/usr/local/www/vpn_pptp.php +++ b/usr/local/www/vpn_pptp.php @@ -99,11 +99,11 @@ if ($_POST) { } if (!$input_errors) { - $subnet_start = ip2long($_POST['remoteip']); - $subnet_end = ip2long($_POST['remoteip']) + $_POST['n_pptp_units'] - 1; + $subnet_start = ip2ulong($_POST['remoteip']); + $subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_pptp_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[] = "The specified server address lies in the remote subnet."; } // TODO: Should this check be for any local IP address? -- cgit v1.1