]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove "and expiry_time IS NULL". Fixes #786
authorAlan T. DeKok <aland@freeradius.org>
Wed, 10 Sep 2014 12:53:19 +0000 (08:53 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 10 Sep 2014 12:53:19 +0000 (08:53 -0400)
DHCP does multiple passes to allocate one IP.  We want to update
the allocated IP, no matter what it's previous state.

The allocate_find query takes care of allocating the correct IP.
We don't need to do extra checks in the allocate_update query

raddb/mods-config/sql/ippool-dhcp/mysql/queries.conf

index bbea23a8f9393e49ae81b2d009e17e02ea367c0c..3ca8c931c986012761fe5e699c5aba393527b523 100644 (file)
@@ -92,7 +92,7 @@ allocate_update = "\
                callingstationid = '%{Calling-Station-Id}', \
                username = '%{User-Name}', \
                expiry_time = NOW() + INTERVAL ${lease_duration} SECOND \
-       WHERE framedipaddress = '%I' AND expiry_time IS NULL"
+       WHERE framedipaddress = '%I'"
 
 #
 #  This series of queries frees an IP number when an accounting