On 29.10.2014 04:04, Alan DeKok wrote:
Eugene Grosbein wrote:
Well, here it is. Not sure about "#include <sys/time.h>" policy in the FreeRADIUS code, though it compiles and works for me.
It's not needed. Also, changing the definition of an existing attribute is a bad idea.
I've re-worked the patch and pushed it to the v3.0.x branch on github. Please try that.
You can set the response delay by doing:
update reply { FreeRADIUS-Response-Delay-Usec = 1500000 }
Which will be 1.5 seconds.
Sadly, this variant is no use for me. I need to be able to return fractional seconds from the Perl code but your version does not allow me that. That is, DHCP NAK is not always a "reject". If legitimate user requests wrong IP address with its DHCPREQUEST, I should send back right IP address with DHCPNAK using zero delay. I should send DHCPNAK with non-zero delay for users with misconfigured hardware only (f.e. PPPoE user asking to DHCP; or if that's DHCP flooder). I have some logic in my perl code and in the database stored procedure it calls to decide that. Eugene Grosbein