diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-06 19:14:49 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-06 19:14:49 +0000 |
commit | a429d1054daaa6cfe1ba53a4cb86a342696b42fb (patch) | |
tree | 6bf01629dc35322c456ec6e12efd4d6e5e21dc67 | |
parent | 68a5dcd8c5fcb7dad04ccb8b47ff22fe1a5621c7 (diff) | |
download | pfsense-a429d1054daaa6cfe1ba53a4cb86a342696b42fb.zip pfsense-a429d1054daaa6cfe1ba53a4cb86a342696b42fb.tar.gz |
Allow PPPoE server subnet to be defined by user.
Ticket #282
-rw-r--r-- | etc/inc/vpn.inc | 6 | ||||
-rwxr-xr-x | usr/local/www/vpn_pppoe.php | 23 |
2 files changed, 17 insertions, 12 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index dfb9a45..193262e 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -830,11 +830,11 @@ pppoe: EOD; - for ($i = 0; $i < $g['n_pppoe_units']; $i++) { + for ($i = 0; $i < $pppoecfg['n_pppoe_units']; $i++) { $mpdconf .= " load pppoe{$i}\n"; } - for ($i = 0; $i < $g['n_pppoe_units']; $i++) { + for ($i = 0; $i < $pppoecfg['n_pppoe_units']; $i++) { $clientip = long2ip(ip2long($pppoecfg['remoteip']) + $i); $ngif = "ng" . ($i+1); @@ -921,7 +921,7 @@ EOD; $mpdlinks = ""; - for ($i = 0; $i < $g['n_pppoe_units']; $i++) { + for ($i = 0; $i < $pppoecfg['n_pppoe_units']; $i++) { $mpdlinks .= <<<EOD pppoe: diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php index 0480cec..0c4319f 100755 --- a/usr/local/www/vpn_pppoe.php +++ b/usr/local/www/vpn_pppoe.php @@ -44,6 +44,7 @@ $pconfig['radiusenable'] = isset($pppoecfg['radius']['enable']); $pconfig['radacct_enable'] = isset($pppoecfg['radius']['accounting']); $pconfig['radiusserver'] = $pppoecfg['radius']['server']; $pconfig['radiussecret'] = $pppoecfg['radius']['secret']; +$pconfig['n_pppoe_units'] = $pppoecfg['n_pppoe_units']; if ($_POST) { @@ -93,6 +94,7 @@ if ($_POST) { $pppoecfg['localip'] = $_POST['localip']; $pppoecfg['mode'] = $_POST['mode']; $pppoecfg['interface'] = $_POST['interface']; + $pppoecfg['n_pppoe_units'] = $_POST['n_pppoe_units']; $pppoecfg['radius']['enable'] = $_POST['radiusenable'] ? true : false; $pppoecfg['radius']['accounting'] = $_POST['radacct_enable'] ? true : false; $pppoecfg['radius']['server'] = $_POST['radiusserver']; @@ -206,14 +208,22 @@ function enable_change(enable_over) { </td> </tr> - <tr> <td width="22%" valign="top" class="vncellreq">Max. concurrent connections</td> - <td width="78%" class="vtable"> - <?=$g['n_pppoe_units'];?> + <td width="78%" class="vtable"> + <select name="n_pppoe_units"> + <?php + for($x=0; $x<33; $x++) { + if($x == $pconfig['n_pppoe_units']) + $SELECTED = " SELECTED"; + else + $SELECTED = ""; + echo "<option value=\"\"{$SELECTED}>{$x}</option>\n"; + } + ?> + </select> </td> </tr> - <tr> <td width="22%" valign="top" class="vncellreq">Server address</td> <td width="78%" class="vtable"> @@ -222,7 +232,6 @@ function enable_change(enable_over) { Enter the IP address the PPPoE server should use on its side for all clients.</td> </tr> - <tr> <td width="22%" valign="top" class="vncellreq">Remote address range</td> <td width="78%" class="vtable"> @@ -264,13 +273,9 @@ function enable_change(enable_over) { Enter the shared secret that will be used to authenticate to the RADIUS server.</td> </tr> - - - <tr> <td height="16" colspan="2" valign="top"></td> </tr> - <tr> <td width="22%" valign="top"> </td> <td width="78%"> |