NAS type with NAS defined in SQL (FR 2.1.6)

Alan DeKok aland at deployingradius.com
Wed Sep 15 17:42:18 CEST 2010


John Doppke wrote:
> I've tried dozens of ways but I can't figure out how to get the NAS type for clients defined in MySQL.
> 
> The column is populated, the query has the correct fields matching the source code for the module.  The module appears to populate the address, shortname, nastype, secret and virtual server.  Yet when I expand "${client:nastype}" I only get a value for clients defined in the clients file.  SQL clients are always blank.

  The "client:nastype" expansion grabs the "nastype" field from the
*config* files.  For SQL... there is no client config file.

> I know I could do a special SQL query on each request, but I shouldn't have to.  The data should already be in a variable.

  Sure.  Send a patch.  See src/main/mainconfig.c, function xlat_client().

  Alan DeKok.



More information about the Freeradius-Users mailing list