3.114.6. AllocateQuery Previous topic Parent topic Child topic Next topic

This optional parameter allows you to define a custom SQL query to allocate an address or prefix that was found with FindQuery. The default is:
update RADPOOL set STATE=1,TIME_STAMP=%0, EXPIRY=%1, USERNAME=%2
       where YIADDR='%3' and STATE=0 and TIME_STAMP %4
The variables are replaces as follows:
  • %0 by the current time in Unix epoch seconds
  • %1 by the lease expiry time (the current time + the lease period)
  • %2 by the user name
  • %3 by the address or prefix
  • %4 by a timestamp comparison operator
  • %5 by the SQL quoted NasId
If the AllocateQuery is an empty string, the query is not executed. This can be useful if the FindQuery does all the allocation work.