summaryrefslogtreecommitdiffstats
path: root/src/usr/local
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2016-01-12 08:39:42 +0000
committerstilez <stilez@users.noreply.github.com>2016-01-12 08:39:42 +0000
commit198ea77bdd7adf8f16443a367a4e3725319a991c (patch)
treed43bd1d1b6eec072599423f133532eb6c25672e0 /src/usr/local
parentf4c114d4a6fcfcd7e69e6a009db683d78d83189d (diff)
downloadpfsense-198ea77bdd7adf8f16443a367a4e3725319a991c.zip
pfsense-198ea77bdd7adf8f16443a367a4e3725319a991c.tar.gz
redmine 5702 - switch to high level IPv4 functions instead of low level ip2long32() etc
Diffstat (limited to 'src/usr/local')
-rw-r--r--src/usr/local/www/services_pppoe_edit.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php
index e34fcb0..6fe3579 100644
--- a/src/usr/local/www/services_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -167,10 +167,7 @@ if ($_POST) {
}
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['pppoe_subnet']);
- $subnet_start = ip2ulong($_POST['remoteip']);
- $subnet_end = ip2ulong($_POST['remoteip']) + $_POST['pppoe_subnet'] - 1;
- if ((ip2ulong($_POST['localip']) >= $subnet_start) &&
- (ip2ulong($_POST['localip']) <= $subnet_end)) {
+ if (is_inrange_v4($_POST['localip'], $_POST['remoteip'], ip_after($_POST['remoteip']), $_POST['pppoe_subnet'] - 1))) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip($_POST['interface'])) {
OpenPOWER on IntegriCloud