diff options
Diffstat (limited to 'config/freeradius2')
-rw-r--r-- | config/freeradius2/freeradius.inc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/freeradius2/freeradius.inc b/config/freeradius2/freeradius.inc index 60ccbdf4..38093780 100644 --- a/config/freeradius2/freeradius.inc +++ b/config/freeradius2/freeradius.inc @@ -432,6 +432,13 @@ if (is_array($arrusers) && !empty($arrusers)) { $varusersmaxbandwidthdown = ($users['varusersmaxbandwidthdown']?$users['varusersmaxbandwidthdown']:''); $varusersmaxbandwidthdown = $varusersmaxbandwidthdown * 1024; + // Accounting-Interim-Interval - Must not be smaller than 60 and should be bigger than 600s + if (($users['varusersacctinteriminterval'] >= '0') && ($users['varusersacctinteriminterval'] < '60')) { + $varusersacctinteriminterval = 60; + } else { + $varusersacctinteriminterval = $users['varusersacctinteriminterval']; + } + // Clear variables for next user foreach additional options TOP $varuserstopadditionaloptions = ''; $varusersadditionaloptionstop = ''; @@ -542,6 +549,10 @@ if (is_array($arrusers) && !empty($arrusers)) { if ($varusersreplyitem != '') { $varusersreplyitem .=","; } $varusersreplyitem .= "\n\tWISPr-Bandwidth-Max-Down := $varusersmaxbandwidthdown"; } + if ($varusersacctinteriminterval != '') { + if ($varusersreplyitem != '') { $varusersreplyitem .=","; } + $varusersreplyitem .= "\n\tAcct-Interim-Interval := $varusersacctinteriminterval"; + } if ($varuserswisprredirectionurl != '') { if ($varusersreplyitem != '') { $varusersreplyitem .=","; } $varusersreplyitem .= "\n\tWISPr-Redirection-URL := $varuserswisprredirectionurl"; @@ -629,6 +640,15 @@ if (is_array($arrmacs) && !empty($arrmacs)) { $varmacsmaxbandwidthdown = ($macs['varmacsmaxbandwidthdown']?$macs['varmacsmaxbandwidthdown']:''); $varmacsmaxbandwidthdown = $varmacsmaxbandwidthdown * 1024; + + // Accounting-Interim-Interval + if (($users['varmacsacctinteriminterval'] >= '0') && ($users['varmacsacctinteriminterval'] < '60')) { + $varmacsacctinteriminterval = 60; + } else { + $varmacsacctinteriminterval = $users['varmacsacctinteriminterval']; + } + + // Clear variables for next mac foreach additional options TOP $varmacstopadditionaloptions = ''; $varmacsadditionaloptionstop = ''; @@ -723,6 +743,10 @@ if (is_array($arrmacs) && !empty($arrmacs)) { if ($varmacsreplyitem != '') { $varmacsreplyitem .=","; } $varmacsreplyitem .= "\n\tWISPr-Bandwidth-Max-Down := $varmacsmaxbandwidthdown"; } + if ($varmacsacctinteriminterval != '') { + if ($varmacsreplyitem != '') { $varmacsreplyitem .=","; } + $varmacsreplyitem .= "\n\tAcct-Interim-Interval := $varmacsacctinteriminterval"; + } if ($varmacswisprredirectionurl != '') { if ($varmacsreplyitem != '') { $varmacsreplyitem .=","; } $varmacsreplyitem .= "\n\tWISPr-Redirection-URL := $varmacsswisprredirectionurl"; |