<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:tnt@kalik.net">tnt@kalik.net</a> a écrit :
<blockquote cite="mid:gT009xpT.1223973822.6323380.tnt@kalik.net"
type="cite">
<pre wrap="">Use unlang to set Pool-Name.
</pre>
</blockquote>
<br>
OK, i guess this soltuion is flexible enough for want i want to do.<br>
<br>
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.<br>
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.<br>
<br>
update control {<br>
"%{MANA-DSL-Type}" = mysqldb:"SELECT value FROM
radcheck WHERE attribute='Subscription-Type' AND
username='%{User-Name}'"<br>
if ("%{MANA-DSL-Type}") {<br>
Pool-Name := "%{Pool-Name}""%{ADSL-Type}"<br>
}<br>
}<br>
<br>
<br>
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:<br>
<br>
# -*- text -*-<br>
# Define internal attribute to use for ME<br>
#<br>
<br>
VENDOR ME 11434<br>
<br>
BEGIN-VENDOR ME<br>
<br>
ATTRIBUTE MANA-DSL-Type 1 string<br>
<br>
END-VENDOR ME<br>
<br>
Does anyone knows how i can acheive this?<br>
<blockquote cite="mid:gT009xpT.1223973822.6323380.tnt@kalik.net"
type="cite">
<pre wrap="">Ivan Kalik
Kalik Informatika ISP
Dana 14/10/2008, "Alexandre Chapellon" <a class="moz-txt-link-rfc2396E" href="mailto:alexandre.chapellon@mana.pf"><alexandre.chapellon@mana.pf></a>
pi¹e:
</pre>
<blockquote type="cite">
<pre wrap="">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 <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
</pre>
</blockquote>
<pre wrap=""><!---->
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
</pre>
</blockquote>
</body>
</html>