DHCP sqlippool reply values
Fajar A. Nugraha
list at fajar.net
Fri Mar 1 02:04:07 CET 2013
On Fri, Mar 1, 2013 at 4:15 AM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
> On 28/02/13 13:36, Igor Smitran wrote:
>>
>> I've added two new fields into radippool table that i am using for DHCP
>> dynamic pools.
>>
>> `gateway` varchar(15) NOT NULL DEFAULT '',
>> `netmask` varchar(15) NOT NULL DEFAULT '',
>>
>> in ippool-dhcp.conf i've added new fields:
>>
>> allocate-find = "SELECT framedipaddress,gateway,netmask FROM
>> ${ippool_table} ....
>>
>> I am not able to figure out how to address new fields inside
>> policy.conf. Is it even possible?
>
>
> I don't think so. The sqlippool module has large parts of the logic in C
> code, including which columns it expects the query to return and what it
> does with them.
If you only have small number of networks, it should be easier to
define gateway and netmask inside an IF block.
Another possible workaround (untested) is to borrow sql.authorize
(e.g. using dummy "User-Name" control variable, set to client's MAC IP
address), and then store the data inside radreply table. Should be
more suitable if you have lots of small networks (e.g /29).
--
Fajar
More information about the Freeradius-Users
mailing list