summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-01-22 10:33:18 -0500
committerjim-p <jimp@pfsense.org>2016-01-22 10:33:50 -0500
commitfa6e61964fe3fa9ffcbcb3fda60c3547b22f9939 (patch)
tree6b44762636e91e064d630ad55950fd35c619807a
parent20c61a6c9b363b9eecd35ee2f1e00aa26bea4dad (diff)
downloadpfsense-fa6e61964fe3fa9ffcbcb3fda60c3547b22f9939.zip
pfsense-fa6e61964fe3fa9ffcbcb3fda60c3547b22f9939.tar.gz
Relocate subnet mask drop-down to a more sensible place on the PPPoE server, add a user login count option.
-rw-r--r--src/etc/inc/vpn.inc7
-rw-r--r--src/usr/local/www/services_pppoe_edit.php28
2 files changed, 26 insertions, 9 deletions
diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc
index d3bcb47..17c3529 100644
--- a/src/etc/inc/vpn.inc
+++ b/src/etc/inc/vpn.inc
@@ -1625,13 +1625,18 @@ poes{$pppoecfg['pppoeid']}{$i}:
EOD;
}
+ if (is_numeric($pppoecfg['n_pppoe_maxlogin']) && ($pppoecfg['n_pppoe_maxlogin'] > 0)) {
+ $pppoemaxlogins = $pppoecfg['n_pppoe_maxlogin'];
+ } else {
+ $pppoemaxlogins = 1
+ }
$mpdconf .=<<<EOD
pppoe_standard:
set bundle no multilink
set bundle enable compression
- set auth max-logins 1
+ set auth max-logins {$pppoemaxlogins}
set iface up-script /usr/local/sbin/vpn-linkup
set iface down-script /usr/local/sbin/vpn-linkdown
set iface idle 0
diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php
index 9f37039..63d87e6 100644
--- a/src/usr/local/www/services_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -101,6 +101,7 @@ if (isset($id) && $a_pppoes[$id]) {
$pconfig['mode'] = $pppoecfg['mode'];
$pconfig['interface'] = $pppoecfg['interface'];
$pconfig['n_pppoe_units'] = $pppoecfg['n_pppoe_units'];
+ $pconfig['n_pppoe_maxlogin'] = $pppoecfg['n_pppoe_maxlogin'];
$pconfig['pppoe_subnet'] = $pppoecfg['pppoe_subnet'];
$pconfig['pppoe_dns1'] = $pppoecfg['dns1'];
$pconfig['pppoe_dns2'] = $pppoecfg['dns2'];
@@ -160,6 +161,9 @@ if ($_POST) {
if (!is_numericint($_POST['n_pppoe_units']) || $_POST['n_pppoe_units'] > 255) {
$input_errors[] = gettext("Number of PPPoE users must be between 1 and 255");
}
+ if (!is_numericint($_POST['n_pppoe_maxlogin']) || $_POST['n_pppoe_maxlogin'] > 255) {
+ $input_errors[] = gettext("User Max Logins must be between 1 and 255");
+ }
if (!is_numericint($_POST['pppoe_subnet']) || $_POST['pppoe_subnet'] > 32) {
$input_errors[] = gettext("Subnet mask must be an interger between 0 and 32");
}
@@ -196,6 +200,7 @@ if ($_POST) {
$pppoecfg['mode'] = $_POST['mode'];
$pppoecfg['interface'] = $_POST['interface'];
$pppoecfg['n_pppoe_units'] = $_POST['n_pppoe_units'];
+ $pppoecfg['n_pppoe_maxlogin'] = $_POST['n_pppoe_maxlogin'];
$pppoecfg['pppoe_subnet'] = $_POST['pppoe_subnet'];
$pppoecfg['descr'] = $_POST['descr'];
if ($_POST['radiusserver'] || $_POST['radiusserver2']) {
@@ -339,19 +344,19 @@ $section->addInput(new Form_Select(
));
$section->addInput(new Form_Select(
- 'pppoe_subnet',
- 'Subnet mask',
- $pconfig['pppoe_subnet'],
- array_combine(range(0, 32, 1), range(0, 32, 1))
-))->setHelp('Hint: 24 is 255.255.255.0');
-
-$section->addInput(new Form_Select(
'n_pppoe_units',
- 'PPPoE User Count',
+ 'Total User Count',
$pconfig['n_pppoe_units'],
array_combine(range(1, 255, 1), range(1, 255, 1))
))->setHelp('The number of PPPoE users allowed to connect to this server simultaneously.');
+$section->addInput(new Form_Select(
+ 'n_pppoe_maxlogin',
+ 'User Max Logins',
+ $pconfig['n_pppoe_maxlogin'],
+ array_combine(range(1, 255, 1), range(1, 255, 1))
+))->setHelp('The number of times a single user may be logged in at the same time.');
+
$section->addInput(new Form_IpAddress(
'localip',
'Server Address',
@@ -366,6 +371,13 @@ $section->addInput(new Form_IpAddress(
$pconfig['remoteip']
))->setHelp('Specify the starting address for the client IP address subnet');
+$section->addInput(new Form_Select(
+ 'pppoe_subnet',
+ 'Subnet mask',
+ $pconfig['pppoe_subnet'],
+ array_combine(range(0, 32, 1), range(0, 32, 1))
+))->setHelp('Hint: 24 is 255.255.255.0');
+
$section->addInput(new Form_Input(
'descr',
'Description',
OpenPOWER on IntegriCloud