Fajar A. Nugraha
list at fajar.net
Tue Apr 17 23:54:06 CEST 2012
On Wed, Apr 18, 2012 at 12:27 AM, qbik <flamana at gmail.com> wrote:
> Sorry it took too long to respond. Basically what I want to accomplish is to
> give an IP based on a group that has a specific Max-All-Session-Time. So for
> example if a group has 3600 as Max-All-Session-Time, the ip would be leased
> for 3600 sec. Fajar, i was checking your contribution here:
Do you mean Session-Timeout?
Max-All-Session-Time is a sum of all sesision time for that user,
which wouldn't make sense to be used as lease time.
It should be in v2.1.x git branch already.
> Do you think this can be accomplished with your DHCP-sqlippol changes?
Not directly, no.
DHCP and radius part of FR is basically two separate entity that
doesn't really talk to each other. It does have access to the same db
If you store the attribute (i.e. Session-Timeout) somewhere in
radcheck/radgroupcheck, you need to write some simple code (with
unlang) to get that value out of the db and into dhcp's lease time
attribute. Should be possible, but it's not written/tested yet.
If the attribute is calculated (i.e. when you calculate
Session-Timeout with sqlcounter), it's harder. It might be possible to
"hijack" the module to do recalculation (just like how sqlipool was
hijacked to provide ip address for dhcp), but it's not written/tested
IMHO if you ONLY concerned about lease time, just use a short one,
roughly double whatever value you're using for interim-updates. It's
MUCH easier and cleaner that way :)
More information about the Freeradius-Users