issue with dialup.conf

Brian Candler B.Candler at pobox.com
Sun Feb 6 21:12:40 CET 2011


On Sun, Feb 06, 2011 at 09:41:36PM +0200, Tyller D wrote:
>    Sorry, maybe i didn't explain correctly.
>    Im not updating the database. I am using auth-type perl and when the
>    user authenticates my perl script looks in the db to see what nas is
>    bieng used on that IP and then checks the value for "databank" for the
>    user and then send the correct attribute with the correct value like so
> 
>    $RAD_REPLY{'Nomadix-MaxBytesDown'} = "$DATABANK";
>    (in this example its a nomadix gateway)

Which DB is Perl looking into to find $DATABANK? You mention the "radcheck"
table.  Does that mean you're using rlm_sql for authorization too?  In which
case, does the perl code look in a different set of SQL tables, or the same
ones?

Normally, reply attributes would go in "radreply" not "radcheck" - although
"radcheck" is a good place to set control attributes.

Or is all of the database access being done from Perl (in which case
"radcheck" is just a coincidental name?) I don't think so, because you said
you're using rlm_sql to update your accounting tables.

I think it might be sensible for you to post actual code and configs, and
specifics such as what database you're using.  Otherwise we're just playing
a game of "twenty questions".

>    That part works perfectly. The issue im having is when the stop request
>    comes in, it doesn't update the value in the radcheck table, well it
>    does but only sometimes..

If "sometimes" means 99.9% of the time, then that's the sort of bug which
can be hard to debug.  If it means 50% of the time, then it should be quite
easy for you to replicate it and nail it down.  If your database supports
query logging, turn it on.  Then you can see *exactly* what update is being
sent, and whether it's being rejected for some reason at the database side.

Regards,

Brian.



More information about the Freeradius-Users mailing list