On Fri, Mar 1, 2013 at 4:15 AM, Phil Mayers <p.may...@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
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to