Using a single row in radreply
Fajar A. Nugraha
list at fajar.net
Mon Aug 15 17:13:45 CEST 2011
On Mon, Aug 15, 2011 at 9:35 PM, denizaydin <deniz.aydin at turknet.net.tr> wrote:
> Hi,
>
> I am new to FreeRadius and trying to migrate from radiator to FreeRadius for
> our broadband solution.
>
> We are using SQL for subscriber aaa. As It'is stated in the documentation
> radreply is expecting the return data in form of multiple rows per users
> which each one includes one attribute, value and Operator if any reply
> attributes is defined for that users.
>
> The problem is our database is composed of one row per subscriber which
> includes multiple reply attributes.
>
> Like ;
> Username iproute inacl outacl
> test X Y Z
>
> But accourding to documentation it should be Like;
>
> Username Attribute Value Op
> test iproute X :=
> test inacl Y :=
> test outacl Z :=
>
> how can I change the behavior of the radreply , or is there any other
> solution to this.
Three options, none of them are "easy":
(1) create a new schema, import the data to the new schema and make it
freeradius-style. I'm guessing you don't want this.
(2) edit FR source code. Not recommended (even assuming that it can be
done), as your schema prevents adding other attributes
(3) edit the sql query, so that the output becomes what FR expects it
to be. You could make use of UNION and possibly stored procedure.
Option (3) is probably easiest, assuming you can find someone with
enough sql knowledge to help you :)
--
Fajar
More information about the Freeradius-Users
mailing list