Unlang on preacct section
Hi, currently, I use freeradius-3.0.14 and I'm trying to integrate use of cache inside of preacct section. I see a strange behavior... when cache return not_found instead of continue with next instruction processing of the request is interrupted with: Wed Sep 27 14:26:51 2017 : Debug: (0) [cache] = notfound Wed Sep 27 14:26:51 2017 : Debug: (0) } # preacct = notfound Wed Sep 27 14:26:51 2017 : Debug: (0) Not sending reply to client. Unlang processing of the preacct section is equal to authorize/accounting/pre-proxy o post proxy sections ? In my server I have a configuration like this on preacct section: preacct { update control { &Cache-Status-Only := 'yes' &Cache-Merge := 'no' } cache if (notfound) { sql.authorize update control { &Cache-Status-Only := 'no' &Cache-Merge := 'yes' } # Store entry on cache cache_auth } else { update control { &Cache-Status-Only := 'no' &Cache-Merge := 'yes' } # Retrieve data from cache cache } ... } It seems that on preacct is not accepted a return value equal to not_found on called modules. Thanks in advance for any suggestions or informations. G.
On Sep 27, 2017, at 9:56 AM, Geaaru <geaaru@gmail.com> wrote:
Unlang processing of the preacct section is equal to authorize/accounting/pre-proxy o post proxy sections ?
Mostly. Read this guide to see exactly how the server processes packets: http://networkradius.com/doc/FreeRADIUS-Technical-Guide.pdf
It seems that on preacct is not accepted a return value equal to not_found on called modules.
You can over-ride return codes of modules. See "man unlang". preacct { ... cache_auth { notfound = 1 } if (notfound) { do things ... } Alan DeKok.
Thank you very very much for your so fast reply. It works. G. On Wed, 2017-09-27 at 10:15 -0400, Alan DeKok wrote:
On Sep 27, 2017, at 9:56 AM, Geaaru <geaaru@gmail.com> wrote:
Unlang processing of the preacct section is equal to authorize/accounting/pre-proxy o post proxy sections ?
Mostly. Read this guide to see exactly how the server processes packets:
http://networkradius.com/doc/FreeRADIUS-Technical-Guide.pdf
It seems that on preacct is not accepted a return value equal to not_found on called modules.
You can over-ride return codes of modules. See "man unlang".
preacct { ... cache_auth { notfound = 1 } if (notfound) { do things ... }
Alan DeKok.
participants (2)
-
Alan DeKok -
Geaaru