summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_pppoe.php
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-05-20 10:48:39 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-05-20 10:55:02 -0600
commit9603306327f07205ac69ea99b8c0666ba9dc8a1d (patch)
tree105765d1e09bbb9eea4dacfb7ff0f2cb1f943a89 /usr/local/www/vpn_pppoe.php
parent986a3accd40a7d45c0a3d48d2b42d2c58a231d99 (diff)
downloadpfsense-9603306327f07205ac69ea99b8c0666ba9dc8a1d.zip
pfsense-9603306327f07205ac69ea99b8c0666ba9dc8a1d.tar.gz
Various fixes to usage of ip2long, long2ip, and negated subnet masks, mostly affecting 64-bit. Ticket #459
Diffstat (limited to 'usr/local/www/vpn_pppoe.php')
-rwxr-xr-xusr/local/www/vpn_pppoe.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php
index 7b0cd41..d95302e 100755
--- a/usr/local/www/vpn_pppoe.php
+++ b/usr/local/www/vpn_pppoe.php
@@ -98,11 +98,11 @@ if ($_POST) {
if (!$input_errors) {
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['pppoe_subnet']);
- $subnet_start = ip2long($_POST['remoteip']);
- $subnet_end = ip2long($_POST['remoteip']) + $_POST['pppoe_subnet'] - 1;
+ $subnet_start = ip2ulong($_POST['remoteip']);
+ $subnet_end = ip2ulong($_POST['remoteip']) + $_POST['pppoe_subnet'] - 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.";
}
if ($_POST['localip'] == get_interface_ip("lan")) {
OpenPOWER on IntegriCloud