1.1.7 sqlippool %{SQL-User-Name}

Hugh Messenger hugh at alaweb.com
Tue Jul 17 00:53:11 CEST 2007


Peter . as per your postgres 1.1.7 sqlippool queries, I changed the MySQL
ones to use %{SQL-User-Name} instead of %{User-Name} . only it doesn't seem
to pick up a value, so the UserName is coming up blank in the radippool
table.

 

Example:

 

sqlippool_expand: 'UPDATE radippool   SET expiry_time = NOW() + INTERVAL
3600 SECOND   WHERE NASIPAddress = '%{Nas-IP-Address}'   AND pool_key =
'%{Calling-Station-Id}'   AND UserName = '%{SQL-User-Name}'   AND
CallingStationId = '%{Calling-Station-Id}'   AND FramedIPAddress =
'%{Framed-IP-Address}''

radius_xlat:  'UPDATE radippool   SET expiry_time = NOW() + INTERVAL 3600
SECOND   WHERE NASIPAddress = '216.108.219.36'   AND pool_key =
'00:14:6C:37:16:49'   AND UserName = ''   AND CallingStationId =
'00:14:6C:37:16:49'   AND FramedIPAddress = '172.168.124.120''

 

This happens on both 1.1.6 and 1.1.7.

 

Should that be something like %{control:SQL-User-Name} ?

 

My apologies - I don't know how I missed this when testing yesterday.  I
guess it returned an IP just fine, so I didn't actually look at what it was
doing too closely!

 

   -- hugh

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20070716/31dc4938/attachment.html>


More information about the Freeradius-Users mailing list