(RADIATOR) Modification of AllocateQuery for dynamic IP address assignment

Ingvar Bjarnason ingvarbj at centrum.is
Fri Jun 6 10:02:32 CDT 2003


Hi all,

    A while ago we made a change to the allocation query used to allocate IP
addresses from a pool.   So far no major problems but I just wanted to check
if anybody had done something similar :

AllocateQuery   update RADPOOL set STATE=1,TIME_STAMP=%0, EXPIRY=%1,
USERNAME=%2 where YIADDR='%3' and STATE=0 and TIME_STAMP %4

Basically we modified the AllocateQuery to include STATE=0 to make doubly
sure any two processes dont allocate the same ip since several radiator
processes are accessing the same pool.  The find and allocate query happen
in sequence so theoretically two processes could first select and then
update the same field but with this modification the second update will
fail.  This is difficult to simulate but we are assuming the second update
query will then return a fail to the handler and the users request be
rejected.  Anyone know if we are correct in assuming this ?

    Best regards,

                       Ingvar

-----
Ingvar Bjarnason
Engineer/Data Division
Iceland Telecom

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list