summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-12 09:18:51 -0200
committerRenato Botelho <renato@netgate.com>2016-01-12 09:18:51 -0200
commit481315a275605874730ac1c6e71e4c1ad233d807 (patch)
tree701eac30c1f6a05aeb4449126cc3b731af1edee4 /src
parent716de0753db30be612f8a5dc494b4a8e789b5910 (diff)
parent5baae73d21372ce9fff0128e68d362e6858b0707 (diff)
downloadpfsense-481315a275605874730ac1c6e71e4c1ad233d807.zip
pfsense-481315a275605874730ac1c6e71e4c1ad233d807.tar.gz
Merge pull request #2413 from stilez/patch-17
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/vpn_l2tp.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php
index 588ada8..4431a9a 100644
--- a/src/usr/local/www/vpn_l2tp.php
+++ b/src/usr/local/www/vpn_l2tp.php
@@ -135,11 +135,7 @@ if ($_POST) {
if (!$input_errors) {
$_POST['remoteip'] = $pconfig['remoteip'] = gen_subnet($_POST['remoteip'], $_POST['l2tp_subnet']);
- $subnet_start = ip2ulong($_POST['remoteip']);
- $subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_l2tp_units'] - 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['n_l2tp_units'] - 1)) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip("lan")) {
OpenPOWER on IntegriCloud