Freeradius 3.0.25 not processing accounting section after sqlippool module returns notfound

Antônio Modesto modesto at hubsoft.com.br
Fri Dec 24 16:35:25 CET 2021


On 23/12/2021 17:48, Antônio Modesto wrote:
>
> Recently I upgraded one of my servers to freeradius 3.0.25 and I am 
> facing a problem that did not happen in the previous version (3.0.21). 
> I have the following code in my accounting session:
>
> accounting {
>
>         if (Framed-Protocol == PPP && Acct-Status-Type != Accounting-On) {
>             -sqlippool
>         }
>
>     if (Acct-Status-Type != Accounting-On) {
>             -sql
>
>             if (noop) {
>                 ok
>             }
>         }
>
>     if (Acct-Status-Type == Accounting-On || Acct-Status-Type == 
> Accounting-Off) {
>             log_accounting
>         }
>
>     attr_filter.accounting_response
> }
>
>
> In this server we do not have any pools enabled, so the radippool 
> table is empty. When analysing the output in debug mode, the 
> accounting section stops executing after sqlippool is called (The 
> module returns notfound):
>
> (1) sqlippool:    --> UPDATE radippool SET expiry_time = 
> 'now'::timestamp(0) + '43200 seconds'::interval WHERE nasipaddress = 
> 'A.B.C.D' AND pool_key = 'C8:3A:35:23:97:08' AND framedipaddress = 
> '172.17.105.22' AND username = 'user008274' AND callingstationid = 
> 'C8:3A:35:23:97:08'
> (1) sqlippool: Executing query: UPDATE radippool SET expiry_time = 
> 'now'::timestamp(0) + '43200 seconds'::interval WHERE nasipaddress = 
> 'A.B.C.D' AND pool_key = 'C8:3A:35:23:97:08' AND framedipaddress = 
> '172.17.105.22' AND username = 'user008274' AND callingstationid = 
> 'C8:3A:35:23:97:08'
> rlm_sql_postgresql: Status: PGRES_COMMAND_OK
> rlm_sql_postgresql: query affected rows = 0
> rlm_sql (sql): Released connection (3)
> (1)       [sqlippool] = notfound
> (1)     } # if (Framed-Protocol == PPP && Acct-Status-Type != 
> Accounting-On)  = notfound
> (1)   } # accounting = notfound
>
>
> What should I do to force freeradius to continue the work in the 
> accounting section even when sqlippool returns notfound?
>
> -- 
> Att, *Antônio Modesto*

Hello,

I solved the problem with this configuration, in case anyone needs in 
the future:


           if (Framed-Protocol == PPP && Acct-Status-Type != 
Accounting-On) {
               -sqlippool {
                   notfound = 1
               }

               if (notfound) {
                   ok
               }
           }


Regards.

-- 
Att, *Antônio Modesto*


More information about the Freeradius-Users mailing list