authorize_check_query - authorize_reply_query - synchronous or asynchronous?

freeradius at duxtel.com freeradius at duxtel.com
Mon Nov 23 12:25:52 CET 2009


G'day!

>   <sigh>  Do you understand how databases work?

Heheh - uh, yes: I understand how a database works!

>   Does the pgsql function do things AFTER it returns?

<duh> Of course not!

>   I have *no idea* how you concluded that when I said the exact opposite.

Hmmmm, I read your last reply again with hindsight gained from this new
response, and I still can't interpret that comment as a definitive answer to
the question.

>   Could you explain why my previous answer is incomprehensible to you?

I am wondering if this is a genuine question, or if there is some sarcastic
or condescending undertone - but when I look at my last reply to you, I
realise that those comments could be taken that way too!  And since no such
thing were intended, I'll respond anyway (whether you are interested or not!
;-)

Perhaps I am missing some significant detail that is obvious to you...(?)  I
am coming to this discussion with the assumption that the two queries we are
talking about might be executed synchronously by freeradius:  as in both
functions are called at the same time, and the radius reply packet is
constructed from the joint results of both.

Perhaps this is just a plain dumb idea, but that has been my thinking :-}

I've done a bit (NOT a lot!) of C++ coding in the past, and I'm thinking of
synchronous (vs asynchronous) functions that can be called essentially
simultaneously by the core process, and then retrieved a few cycles later
when the results of those functions have become available.

If that were the case for freeradius db queries, then it is conceivable that
the radius reply query could complete before the auth function had finished
doing it's job.

In fact the way I see it, and the way I have the database queries working at
the moment, /if/ the radius reply were executed BEFORE the radius auth were
called, the system would probably work just the same and with no noticeable
effect on functionality!

But all that aside, I now understand (although you have not actually *said*
it ;-) that if radius_auth_query makes updates to the database,
radius_reply_query result will ALWAYS reflect up those changes - and that is
all that I need to know!

So thanks indeed! :-)

Much appreciated (truly - no sarcasm intended! :-)

Cheers,  Mike.







More information about the Freeradius-Users mailing list