diff options
author | Ermal <eri@pfsense.org> | 2010-06-17 19:22:52 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-06-17 19:22:52 +0000 |
commit | 822b687b162a5022d9d687cf98867149e1af126f (patch) | |
tree | 17641bb98ef8d6e8e8df31dfb86a5e5e60e7f191 /usr/local/www | |
parent | 7af53acecd3b0c4b8c78a17992513bf9b4f75f35 (diff) | |
download | pfsense-822b687b162a5022d9d687cf98867149e1af126f.zip pfsense-822b687b162a5022d9d687cf98867149e1af126f.tar.gz |
Do not assume WAN as the default interface to get the ip from for the calling station id. Instead add a select box(list) to choose the interface(ip) to send to radius.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/services_captiveportal.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index 5206535..c47eba9 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -98,6 +98,7 @@ $pconfig['radiuskey'] = $config['captiveportal']['radiuskey']; $pconfig['radiuskey2'] = $config['captiveportal']['radiuskey2']; $pconfig['radiusvendor'] = $config['captiveportal']['radiusvendor']; $pconfig['radiussession_timeout'] = isset($config['captiveportal']['radiussession_timeout']); +$pconfig['radiussrcip_attribute'] = $config['captiveportal']['radiussrcip_attribute']; $pconfig['passthrumacadd'] = isset($config['captiveportal']['passthrumacadd']); $pconfig['passthrumacaddusername'] = isset($config['captiveportal']['passthrumacaddusername']); $pconfig['radmac_format'] = $config['captiveportal']['radmac_format']; @@ -200,6 +201,7 @@ if ($_POST) { $config['captiveportal']['radiuskey2'] = $_POST['radiuskey2']; $config['captiveportal']['radiusvendor'] = $_POST['radiusvendor'] ? $_POST['radiusvendor'] : false; $config['captiveportal']['radiussession_timeout'] = $_POST['radiussession_timeout'] ? true : false; + $config['captiveportal']['radiussession_timeout'] = $_POST['radiussrcip_attribute']; $config['captiveportal']['passthrumacadd'] = $_POST['passthrumacadd'] ? true : false; $config['captiveportal']['passthrumacaddusername'] = $_POST['passthrumacaddusername'] ? true : false; $config['captiveportal']['radmac_format'] = $_POST['radmac_format'] ? $_POST['radmac_format'] : false; @@ -263,6 +265,7 @@ function enable_change(enable_change) { document.iform.noconcurrentlogins.disabled = endis; document.iform.radiusvendor.disabled = radius_endis; document.iform.radiussession_timeout.disabled = radius_endis; + document.iform.radiussrcip_attribute.disabled = radius_endis; document.iform.htmlfile.disabled = endis; document.iform.errfile.disabled = endis; document.iform.logoutfile.disabled = endis; @@ -528,6 +531,26 @@ value="<?=htmlspecialchars($pconfig['radiuskey2']);?>"></td> </tr> <tr> + <td class="vncell" valign="top">Radius ip attribute</td> + <td> + <select name="radiussrcip_attribute" id="radiussrcip_attribute"> + <?php $iflist = get_configured_interface_with_descr(); + foreach ($iflist as $ifdesc => $ifdescr) { + $ipaddr = get_interface_ip($ifdesc); + if (is_ipaddr($ipaddr)) { + $selected = ""; + if ($ipaddr == $pconfig['radiussrcip_attribute']) + $ifdesc = "selected"; + echo "<option value='{$ifdesc}' {$selected}>{$ifdescr} - {$ipaddr}</option>\n"; + } + } + ?> + </select><br/> + Choose the ip to use for calling station attribute. + </td> + </tr> + + <tr> <td class="vncell" valign="top">Session-Timeout</td> <td class="vtable"><input name="radiussession_timeout" type="checkbox" id="radiussession_timeout" value="yes" <?php if ($pconfig['radiussession_timeout']) echo "checked"; ?>><strong>Use RADIUS Session-Timeout attributes</strong><br> When this is enabled, clients will be disconnected after the amount of time retrieved from the RADIUS Session-Timeout attribute.</td> |