disappearing configuration items in unlang

Hugh Messenger hugh at alaweb.com
Tue Jul 3 22:40:34 CEST 2007


I'm using the latest and greatest 2.0.0 HEAD.

If I wrap an 'if' statement round something (in this case a query in
mysql_dialup.conf), any config items seem to get blown away.

So for instance:

                authorize_reply_query = "\
SELECT id, UserName, Attribute, Value, op \
FROM ${authreply_table} \
WHERE Username = '%{SQL-User-Name}' \
AND (Huntgroup = '%{Huntgroup-Name}'  OR Huntgroup = '') \
ORDER BY id"

... is just fine, but as soon as I wrap an 'if' round it ...

        # hugh - huntgroup test
        if ("${use_huntgroup}" == "yes") {
                authorize_reply_query = "\
SELECT id, UserName, Attribute, Value, op \
FROM ${authreply_table} \
WHERE Username = '%{SQL-User-Name}' \
AND (Huntgroup = '%{Huntgroup-Name}'  OR Huntgroup = '') \
ORDER BY id"
        }
        else {
                authorize_reply_query = "\
SELECT id, UserName, Attribute, Value, op \
FROM ${authreply_table} \
WHERE Username = '%{SQL-User-Name}' \
ORDER BY id"
        }

... radiusd barfs on startup with:

config: No such configuration item authreply_table in section if when
expanding string "SELECT id, UserName, Attribute, Value, op FROM
${authreply_table} WHERE Username = '%{SQL-User-Name}' ORDER BY id"

I'm setting 'use_huntgroup' in sql.conf, if that makes any difference.  But
using "if (1)" has the same effect.

I am at a loss.

   -- hugh





More information about the Freeradius-Users mailing list