summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_pppoe_edit.php
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 /src/usr/local/www/services_pppoe_edit.php
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.
Diffstat (limited to 'src/usr/local/www/services_pppoe_edit.php')
-rw-r--r--src/usr/local/www/services_pppoe_edit.php28
1 files changed, 20 insertions, 8 deletions
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