Handing out duplicate IP addresses

tnt at kalik.net tnt at kalik.net
Thu Jan 15 11:29:22 CET 2009


>The requests all came in at the same time, to the second (among others),
>its like FR took 3 requests and looked at the database at the exact same
>time, saw it was an available IP and all those 3 requests assigned it.

That can't be avoided. SELECT (allocate-find) will always work much
faster than UPDATE (allocate-update).

>My NAS rejects two of the 3 because the IP is assigned,

I think that you make a good point here. If the allocate-update query was
made to fail in the case that the IP address was already issued to
another thread between allocate-find and allocate-update (by expanding
it with AND expiry_time IS NULL in WHERE), point of failure will be in
sqlippool module and not on the NAS. Logic can then perhaps try to issue
a new IP address (best just once more in order not to create a loop).
That way issuing same IP address to multiple threads can be handled by
the sqlippool module.

Ivan Kalik
Kalik Informatika ISP




More information about the Freeradius-Users mailing list