diff options
author | stilez <stilez@users.noreply.github.com> | 2016-01-12 08:48:30 +0000 |
---|---|---|
committer | stilez <stilez@users.noreply.github.com> | 2016-01-12 08:48:30 +0000 |
commit | 5baae73d21372ce9fff0128e68d362e6858b0707 (patch) | |
tree | 2e158fff3c0a29a450a7cb3270e8ef5528b865b6 /src | |
parent | f4c114d4a6fcfcd7e69e6a009db683d78d83189d (diff) | |
download | pfsense-5baae73d21372ce9fff0128e68d362e6858b0707.zip pfsense-5baae73d21372ce9fff0128e68d362e6858b0707.tar.gz |
redmine 5702 - switch to high level IPv4 functions instead of low level ip2long32() etc
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/vpn_l2tp.php | 6 |
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")) { |