Hi Ivan, tnt@kalik.net wrote:
I've tried adding to the radcheck table ( INSERT into `radcheck` SET `id` = 0, `username` = '447XXXXXXXX', `attribute` = 'Pool-Name' `op` = ':=', `value` = '%{control:Huntgroup-Name}`; ) Sorry The result is still the same: Wed Feb 18 16:53:34 2009 : Debug: rlm_sql (sql): Reserving sql socket id: 2 Wed Feb 18 16:53:34 2009 : Info: [sqlippool] expand: %{Calling-Station-ID} -> 4477XXXXXX Wed Feb 18 16:53:34 2009 : Info: [sqlippool] sql_set_user escaped user --> '4477XXXXXX' Wed Feb 18 16:53:34 2009 : Info: [sqlippool] expand: START TRANSACTION -> START TRANSACTION Wed Feb 18 16:53:34 2009 : Debug: rlm_sql_mysql: query: START TRANSACTION Wed Feb 18 16:53:34 2009 : Info: [sqlippool] expand: UPDATE radippool SET expiry_time = NOW() WHERE callingstationid = '%{Calling-Station-Id}' AND pool_name = '%{control:Pool-Name}' -> UPDATE radippool SET expiry_time = NOW() WHERE callingstationid = '447775777672' AND pool_name = '=25=7Bcontrol:Huntgroup-Name=7D' Wed Feb 18 16:53:34 2009 : Debug: rlm_sql_mysql: query: UPDATE radippool SET expiry_time = NOW() WHERE callingstationid = '4477XXXXXX' AND pool_name = '=25=7Bcontrol:Huntgroup-Name=7D' Wed Feb 18 16:53:34 2009 : Info: [sqlippool] expand: SELECT framedipaddress FROM radippool WHERE pool_name = '%{control:Pool-Name}' AND callingstationid = '%{Calling-Station-Id}' LIMIT 1 FOR UPDATE -> SELECT framedipaddress FROM radippool WHERE pool_name = '=25=7Bcontrol:Huntgroup-Name=7D' AND callingstationid = ''4477XXXXXX'' LIMIT 1 FOR UPDATE Wed Feb 18 16:53:34 2009 : Debug: rlm_sql_mysql: query: SELECT framedipaddress FROM radippool WHERE pool_name = '=25=7Bcontrol:Huntgroup-Name=7D' AND callingstationid = ''4477XXXXXX'' LIMIT 1 FOR UPDATE Wed Feb 18 16:53:34 2009 : Info: [sqlippool] SQL query did not return any results Wed Feb 18 16:53:34 2009 : Info: [sqlippool] expand: COMMIT -> COMMIT Wed Feb 18 16:53:34 2009 : Debug: rlm_sql_mysql: query: COMMIT Wed Feb 18 16:53:34 2009 : Debug: rlm_sql (sql): Released sql socket id: 2 Wed Feb 18 16:53:34 2009 : Info: [sqlippool] IP address could not be allocated. Wed Feb 18 16:53:34 2009 : Info: [sqlippool] expand: IP Allocation FAILED from %{control:Pool-Name} (did %{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port} user %{User-Name}) -> IP Allocation FAILED from %{control:Huntgroup-Name} (did eseye.co.uk cli 447775777672 port 12345 user searthrowl) Wed Feb 18 16:53:34 2009 : Info: IP Allocation FAILED from %{control:Huntgroup-Name} (did eseye.co.uk cli 4477XXXXXX port 12345 user searthrowl) Wed Feb 18 16:53:34 2009 : Info: ++[sqlippool] returns noop
It looks as if the MySQL saved value is somehow transformed when it's just been read, but when output during debug/log, is shown correctly; albeit not transformed to the appropriate variable. BTW I missed `attribute` = 'Pool-Name' earlier, the correct SQL is: INSERT into `radcheck` SET `id` = 0, `username` = '4477XXXXXX', `attribute` = 'Pool-Name', `op` = ':=', `value` = '%{control:Huntgroup-Name}'; Is this a bug in expand?
Typo. It should be ' not ` at the end.
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html