3.15.1. GetClientQuery Previous topic Parent topic Child topic Next topic

This parameter specifies the SQL query that is used to fetch client details from the SQL database specified by DBSource. The database can store all the same parameters that are used to configure a <Client> clause. For more information, see Section 3.13. <Client xxxxxx>.
The default for this parameter is:
select NASIDENTIFIER,SECRET,IGNOREACCTSIGNATURE,DUPINTERVAL,
            DEFAULTREALM,NASTYPE,SNMPCOMMUNITY,LIVINGSTONOFFS,
            LIVINGSTONHOLE,FRAMEDGROUPBASEADDRESS,
            FRAMEDGROUPMAXPORTSPERCLASSC,REWRITEUSERNAME,
            NOIGNOREDUPLICATES,PREHANDLERHOOK from RADCLIENTLIST
The default GetClientQuery works with the sample database schemas provided in the goodies/ of your Radiator distribution.
Your database table must include at least the first and second fields, which are the NAS name or IP address or MAC address and the shared secret. All the other fields are optional, but if they occur, they must occur in the given order. When they occur, they are used to initialise the Client parameter of the same name as shown above. The FRAMEDGROUPBASEADDRESS column may contain multiple comma-separated base addresses. The PREHANDLERHOOK column can contain either the text of a hook or a hook filename in the form ‘file:/path/to/hook’. You can customise the GetClientQuery select clause to have additional fields. If they are present in the result of GetClientQuery, they are used as described below. Field number 0 as the first field, so for example Identifier, field 14 has an index of 14, but is the 15th entry in the returned array.
  • Identifier field as field 14
  • DefaultReply as field 15
  • FramedGroup as field 16
  • StripFromReply as field 17
  • AllowInReply as field 18
  • AddToReply as field 19
  • AddToReplyIfNotExist as field 20
  • DynamicReply as field 21
  • AddToRequest as field 22
  • StripFromRequest as field 23
  • AddToRequestIfNotExist as field 24
  • ClientHook as field 25
  • UseContentsForDuplicateDetection as field 26
  • A comma-separated list of flag names as field 27. Each comma-separated name in the field is used to set a Client flag type parameter. For example, if field 27 has the value "IgnoreAcctSignature,UseOldAscendPasswords,StatusServerShowClientDetails", it sets the IgnoreAcctSignature, UseOldAscendPasswords, and StatusServerShowClientDetails flag parameters in the resulting Client.
    # Our custom client table only has NAS identifier, 
    # shared secret and default realm in it:
    GetClientQuery select NAME,SECRET,NULL,NULL,DREALM from CLIENTS