The change you have suggested - where in the many configuration files would that go?
sites-enabled/dhcp
I have attempted to put it in sites-enabled/dhcp and in mods-enabled/preprocess - which parses fine, but essentially seems to do nothing. I've removed the if condition in case something was going weird there.
Run the server in debug mode (-X) and paste the whole of the output into and email to this list What's the difference between the ampersand at the front and not? And using
':=' versus '='?
See man unlang. The ampersand was introduced in version 3.0
OK. When you say 'sql' module, can I have you elaborate a little on that? As in modify the SQL module itself or is there something I should be able to do leveraging existing functionality?
The main SQL module is normally used for RADIUS authentication. But you can probably tweak the SQL statements and/or add some unlang to do what you want. You don't need to edit source code. However you can also run any random SQL statement and put the output into an attribute like this: update control { &Tmp-String-0 := "%{sql:SELECT some_value FROM some_table WHERE mac = '%{DHCP-Client-Hardware-Address}'}" }