tnt@kalik.net a écrit :
Use unlang to set Pool-Name.

  

OK, i guess this soltuion is flexible enough for want i want to do.

So In the authorize section i tried to add an update directive where i define a variable which has the result of the sql query as value.
Then i want to concatenate this variable with the value of the Pool-Name attribute as defined in the users file and set it as the new value of Pool-Name. I think this would work for what i want to do.

update control {
                "%{MANA-DSL-Type}" = mysqldb:"SELECT value FROM radcheck WHERE attribute='Subscription-Type' AND username='%{User-Name}'"
                if ("%{MANA-DSL-Type}") {
                        Pool-Name := "%{Pool-Name}""%{ADSL-Type}"
                }
        }


My problem is i don't know how to define variable with unlang. I have tried making a new directionary with special attribute but it doesn't seems to work. here is what ot looks like:

# -*- text -*-
# Define internal attribute to use for ME
#

VENDOR        ME        11434

BEGIN-VENDOR    ME

ATTRIBUTE    MANA-DSL-Type    1    string

END-VENDOR    ME

Does anyone knows how i can acheive this?
Ivan Kalik
Kalik Informatika ISP


Dana 14/10/2008, "Alexandre Chapellon" <alexandre.chapellon@mana.pf>
pi¹e:

  
Hello,

I have freeradius authenticating ADSL users (several types ADSL).
request are comming from several BAS (my NASes).
I would like freeradius to give customers IP addresses from differents
IP pools based on the NAS from which the request come from (huntgroups
does it perfectly today) but also based on the type for ADSL is
authenticated (this information is stored in the sql database and so the
NAS is completely unaware of it)

ex:

As a reminder, i want thoose pools

pool_NAS1_ADSL512

pool_NAS1_ADSL1024

pool_NAS2_ADSL512

pool_NAS2_ADSL1024



if i am user1 who owns a 1024kb/s ADSL account, I want to have Pool-Name
pool_NAS1_ADSL1024 if the request comes from NAS1 and pool_NAS2_ADSL1024
if the request comes from NAS2...and so on.

Any idea?
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


    

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html