Re: [BUG] NAS-IP-Address being resolved

2004-07-28 Thread Mike Sturdee
In hints, NAS-IP-Address is IP.
In sql.conf NAS-IP-Address is IP.
When a SELECT query from sql.conf gets NASIPAdrress from an sql row, it 
resolves it to a hostname before using it to perform an UPDATE or INSERT 
for accounting stop when called by the zap function. When an accounting 
stop packet comes from the nas, NAS-IP-Address is an IP.

On Tue, 27 Jul 2004, Alan DeKok wrote:
Mike Sturdee [EMAIL PROTECTED] wrote:
I am trying to use sql for the Simultaneous-Use check. I am seeing that
the NAS-IP-Address is being resolved in some places, and used as IP in
others. (I am thinking it should stay IP regardless).
 Hmm... all of the printing of IP addresses should go through one
routine, which should obey the hostname_lookups configuration entry.
 Can you say *which* lookups return addresses, and which return names?
In some places thoughout the config, the NAS-IP-Address is an IP address,
and in other places it is a hostname.
 What config?  There's a lot of configuration things in the server.
 Hostnames in clients.conf or proxy.conf shouldn't matter, as
they don't affect the NAS-IP-Address attribute.
I do have hostname_lookups = yes, but this should still not affect an IP
variable (ie: remote_addr vs. remote_host).
 Uh, no.  It's *intended* to affect the printing of ipaddr
attributes, and not much else.
 Alan DeKok.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-Mike
==
Network Engineer
Pathway Internet Services
616.774.3131
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


[BUG] NAS-IP-Address being resolved

2004-07-27 Thread Mike Sturdee
I am trying to use sql for the Simultaneous-Use check. I am seeing that 
the NAS-IP-Address is being resolved in some places, and used as IP in 
others. (I am thinking it should stay IP regardless).
Here's how it goes:

-SQL query for UserName with AccountSessionTime of 0.
 |--Rows returned
-Run checkrad to verify
   |--Stale session
-Update SQL where Username  AcctSessionId  NASIPAddress
   |--At this point, the NASIPAddress returned from the initial select
  query has been resolved, so it will try and update where
  NASIPAddress='my.host.name' instead of NASIPAddress='1.2.3.4'
  as received from SQL.
-Update query fails, so now it inserts a new session, with NASIPAddress
  being a truncated version of a host name.
-Stale session still remains, so this process is repeated each and every 
time the user logs on.

In some places thoughout the config, the NAS-IP-Address is an IP address, 
and in other places it is a hostname.

I do have hostname_lookups = yes, but this should still not affect an IP 
variable (ie: remote_addr vs. remote_host).

Having hostname_lookups on in 0.9.3 does not produce this result.
-Mike
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: [BUG] NAS-IP-Address being resolved

2004-07-27 Thread Alan DeKok
Mike Sturdee [EMAIL PROTECTED] wrote:
 I am trying to use sql for the Simultaneous-Use check. I am seeing that 
 the NAS-IP-Address is being resolved in some places, and used as IP in 
 others. (I am thinking it should stay IP regardless).

  Hmm... all of the printing of IP addresses should go through one
routine, which should obey the hostname_lookups configuration entry.

  Can you say *which* lookups return addresses, and which return names?

 In some places thoughout the config, the NAS-IP-Address is an IP address, 
 and in other places it is a hostname.

  What config?  There's a lot of configuration things in the server.

  Hostnames in clients.conf or proxy.conf shouldn't matter, as
they don't affect the NAS-IP-Address attribute.

 I do have hostname_lookups = yes, but this should still not affect an IP 
 variable (ie: remote_addr vs. remote_host).

  Uh, no.  It's *intended* to affect the printing of ipaddr
attributes, and not much else.

  Alan DeKok.


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