Want to control the return value when DB did not give positive response.
Here I have some customize requirement and not sure which file/function to change. Normally when DB connection timeout or there is no such user the DB return negative response to radius. and radius return REJECT to nas. I want to control these two situation and not sure which file to change, there are too many return value in the project related with REJECT. -- Best Regards, Yanrui Hu -- *This email may contain or reference confidential information and is intended only for the individual to whom it is addressed. Please refrain from distributing, disclosing or copying this email and the information contained within unless you are the intended recipient. If you received this email in error, please notify us at legal@appannie.com <legal@appannie.com>** immediately and remove it from your system.*
On 26 May 2015, at 23:49, Yanrui Hu <yhu@appannie.com> wrote:
Here I have some customize requirement and not sure which file/function to change. Normally when DB connection timeout or there is no such user the DB return negative response to radius. and radius return REJECT to nas. I want to control these two situation and not sure which file to change, there are too many return value in the project related with REJECT.
man unlang sql { fail = 1 } if (fail) { # do things other than issuing an Access-Reject } if (notfound) { # do something appropriate to not finding the user... } -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
Thanks Arran. Is this mean I need change /etc/freeradius/sql.conf to add those lines? Actuary I need distinguish the situation that DB socket timeout and still return positive value for user access request. (like a weird requirement, but please ignore it's reasonable) Is this unlaung simple script can cover this? On Wed, May 27, 2015 at 11:54 AM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 26 May 2015, at 23:49, Yanrui Hu <yhu@appannie.com> wrote:
Here I have some customize requirement and not sure which file/function to change. Normally when DB connection timeout or there is no such user the DB return negative response to radius. and radius return REJECT to nas. I want to control these two situation and not sure which file to change, there are too many return value in the project related with REJECT.
man unlang
sql { fail = 1 } if (fail) { # do things other than issuing an Access-Reject } if (notfound) { # do something appropriate to not finding the user... }
-Arran
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
-- Best Regards, Yanrui Hu -- *This email may contain or reference confidential information and is intended only for the individual to whom it is addressed. Please refrain from distributing, disclosing or copying this email and the information contained within unless you are the intended recipient. If you received this email in error, please notify us at legal@appannie.com <legal@appannie.com>** immediately and remove it from your system.*
No. sql.conf just contains sql configuration. The unlang policy goes into the relevant authorize section Alan -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
participants (3)
-
Alan Buxey -
Arran Cudbard-Bell -
Yanrui Hu