redundant SQL / WARNING: Unknown module "sql" in string expansion
Hello, I configured my freeradius with redundant SQL config: In sql.conf: Sql sql1 { .... ..... .... } Sql sql2 { ...... ..... ...... } Radiusd.conf: Redundant sql { Sql1 Sql2 } And in my default site config: Authorize { .... ... .... .... Sql ... ... } Now I want to do some extra SQL-queries within my authorize section. I used something like if ("%{sql:select ........ I receive the following error: WARNING: Unknown module "sql" in string expansion "%{sql:select Without the redundant module it works perfectly :) Kind regards, Tom
On 09/11/10 11:28, Tom Teeuwen wrote:
I used something like if (“%{sql:select ……..
I receive the following error: *WARNING: Unknown module "sql" in string expansion "%{sql:select*
Yes. The "redundant" module group isn't a valid target for "xlat" i.e. %{name:} expansions. This would need source code changes to fix. You will have to try each expansion in turn, or expand to a temporary intermediate variable or similar.
Do you have an example of how to achive this ? ________________________________________ Van: freeradius-users-bounces+t.teeuwen=petitverbindt.nl@lists.freeradius.org [freeradius-users-bounces+t.teeuwen=petitverbindt.nl@lists.freeradius.org] namens Phil Mayers [p.mayers@imperial.ac.uk] Verzonden: dinsdag 9 november 2010 13:01 Aan: freeradius-users@lists.freeradius.org Onderwerp: Re: redundant SQL / WARNING: Unknown module "sql" in string expansion On 09/11/10 11:28, Tom Teeuwen wrote:
I used something like if (“%{sql:select ……..
I receive the following error: *WARNING: Unknown module "sql" in string expansion "%{sql:select*
Yes. The "redundant" module group isn't a valid target for "xlat" i.e. %{name:} expansions. This would need source code changes to fix. You will have to try each expansion in turn, or expand to a temporary intermediate variable or similar. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 11/09/2010 05:39 PM, Tom Teeuwen wrote:
Do you have an example of how to achive this ?
You could maybe try something like: update request { Tmp-String-0 := "%{sql1: ... query ...}" } if (Tmp-String-0 =~ /^$/) { # empty string; try 2nd sql update request { Tmp-String-0 := "%{sql2: ... query ...}" } } # now compare contents of Tmp-String-0 Obviously that won't work if you execute a query which has a valid result as "" (empty string)
participants (2)
-
Phil Mayers -
Tom Teeuwen