summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-12 09:18:18 -0200
committerRenato Botelho <renato@netgate.com>2016-01-12 09:18:18 -0200
commit716de0753db30be612f8a5dc494b4a8e789b5910 (patch)
tree0b576de2a7d7e36342c7b163c40373ada70a8c9f /src
parent6e6d9ca1d4f4690756c297eb16ef92b54a591f5a (diff)
parent198ea77bdd7adf8f16443a367a4e3725319a991c (diff)
downloadpfsense-716de0753db30be612f8a5dc494b4a8e789b5910.zip
pfsense-716de0753db30be612f8a5dc494b4a8e789b5910.tar.gz
Merge pull request #2411 from stilez/patch-15
Diffstat (limited to 'src')
-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 1a4b216..70e2b26 100644
--- a/src/usr/local/www/services_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -165,10 +165,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