acct_unique problem

Viana freeradius at radius.net.br
Sun Feb 28 15:20:13 CET 2016


Hello Alan.
Thanks for you reply. As you said, I did this modification into sites-available/default file:
preacct {
"%{NAS-Port}"

if (outer.request) {
                update request {
                        NAS-Port := &NAS-Port
                }
}
...
Here is the log file:
(0) # Executing section preacct from file /usr/local/etc/raddb/sites-enabled/default
(0)   preacct {
(0)     EXPAND %{NAS-Port}
(0)        --> 0
(0)     if (outer.request) {
(0)     if (outer.request)  -> TRUE
(0)     if (outer.request)  {
(0)       update request {
(0)         NAS-Port := &NAS-Port -> 0
(0)       } # update request = noop
(0)     } # if (outer.request)  = noop
The problem is that NAS-Port is 0 (zero) when the request enters preacct, and setting NAS-Port := &NAS-Port  inside preacct is taking the zero value.
Is it possible to set a temporary variable berfore preacct and use this value inside? Something like this:
NAS-Port_temp := &NAS-Port (before preacct)
And inside preacct:
if (outer.request) {
                update request {
                        NAS-Port := &NAS-Port_temp

                }
}
If it´s possible, where can I set NAS-Port_temp to be used by preacct later?
Did you find the solution to this issue for newer versions of FreeRadius?
Thanks again!
Regards
Fabricio 
 

---
Este email foi escaneado pelo Avast antivírus.
http://www.avast.com


More information about the Freeradius-Users mailing list