On 30 Aug 2015, at 09:42, Alan DeKok <aland@deployingradius.com> wrote:
On Aug 27, 2015, at 2:40 PM, Бен Томпсон <b.thompson@latera.ru> wrote:
I have configured FreeRADIUS to as a DHCP server which offers IP addresses based on the option 82 values added by a DHCP relay. In cases where the client sends a unicast renew request bypassing the relay, the option 82 values are queried from an instance of rlm_cache which have configured to keep a record of leases. (This replicates the option 82 "Stash" functionality in ISC DHCP Server). A bit of unlang is involved to check that the lease is valid and take care of clearing out the cache, but it is all fairly simple.
I've pushed changes to the v3.0.x
and v3.1.x?
branch which should help. They allow the server to encode and decode lease query packets.
You will need to:
- add a "dhcp DHCP-Lease-Query {...}" section to raddb/sites-available/dhcp
- have the section return "ok"
- have the section do:
update reply { DHCP-Message-Type := DHCP-Lease-Assigned # or whatever you want to return DHCP-Hardware-Address-Length := 0 }
I think that should now work.
Neat. I'll add a Pool-Action Status to the new rlm_redis_ippool (which will become the new rlm_ippool), then we can abstract getting the lease information back. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2