Freeradius-Users Digest, Vol 27, Issue 24
Hugh Messenger
hugh at alaweb.com
Fri Jul 6 18:20:20 CEST 2007
Peter Nixon <listuser at peternixon.net> said:
> And different pool names in each instance....
Yup, although obviously the Pool-Name is set up independently of the
sqlippool instances. I have some unlang at the start of 'authorize' section
that sets the Pool-Name based on a mix of NAS IP and Calling-Station-Id.
I also have some NAS's in the main 'dialup' Huntgroup that do their own pool
assignments (so I don't set a Pool-Name). So I've wrapped the group stuff
inside a test ...
Post-Auth-Type alaweb {
if ("%{control:Pool-Name}") {
group {
...
}
}
}
(I tried wrapping it round the whole of the Post-Auth-Type block, but FR
doesn't like that)
Anyway, that part now works famously, thank you.
My one remaining question is, what should the 'accounting' section look
like? As far as I can tell, the accounting queries always return OK (except
if there was some kind of database problem) regardless of whether a table
row was affected or not. Which is to be expected I suppose, as 'notfound'
isn't normally relevant in an accounting query.
But I obviously need to apply the right instance, so I get the right
pool-key for the allocate/clear queries. So I guess I'll have to wrap some
unlang around it like ...
if ("%{control:Pool-Name}") {
if ("%{control:Huntgroup-Name" == "dialup") {
sqlippool_dialup
}
elsif ("%{control:Huntgroup-Name" == "wireless") {
sqlippool_wireless
}
}
Just out of interest, what would the recommended 'accounting' config look
like for the Wiki example?
> > Thankyou for being so patient!
>
> You are welcome. Everyone is/was helped by someone when they start out :-)
I'm definitely at that "a little knowledge is a dangerous thing" stage with
FR. :)
I do fully intend to try and pay forward some of the help I've been getting
by building a "Wireless and Dialup with MySQL Cookbook" for the wiki, once
I've gotten this all sorted out!
> Peter Nixon
> http://www.peternixon.net/
> PGP Key: http://www.peternixon.net/public.asc
-- hugh
More information about the Freeradius-Users
mailing list