>But there seems to be a problem with this statement now:
>
>-------------
>SELECT framedipaddress FROM radippool  WHERE pool_name = 'poolDE' AND 
>expiry_time < NOW()  ORDER BY (username <> 'peter2'),  (callingstationid <> 
>''),  expiry_time  LIMIT 1  FOR UPDATE
>------------
>
>This statement should receive a free ip-adress, i think, but it doesn't.

There is also a clue:

>[sqlippool] SQL query did not return any results

Your IP pool is used up.

>I think the problem is the part "expiry_time < NOW()". This is not working in 
>mysql. Does anyone know how to fix this?

Hm, does it "see" NULL greater than now()? Replace NULL in expiry_time
column with "0000-00-00 00:00:00" (that's what MySQL thinks null
datetime is - it will match IS NULL). And in that previous query replace
= NULL with = '0000-00-00 00:00:00'.

If this is so, sqlippool schema will need to be changed.

Ivan Kalik
Kalik Informatika ISP

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to