hi all!!!
I am having a group of users which are allowed to connect only between
5:00:00 am in the morning until 1:00:00 pm in the afternoon.
The configuration file for the same is as follows:
##############snaphsot of radius.cfg
############################################
<AuthBy SQL>
DBSource dbi:mysql:mainaccounts
DBUsername root
DBAuth new-password
NoDefault
AuthSelect select
password,(least(balancetime,(time_to_sec('14:00:00')-time_to_sec(current_tim
e)))) \
as session from amcard where (username='%n' and
'05:00:00'<=current_time \
and '14:00:00'> current_time and status = 1
and balancetime>0 and \
(expiry_date is null or expiry_date > now()) )
AuthColumnDef 0,Password,check
AuthColumnDef 1,Session-Timeout,Reply
AddToReply Service-Type = Framed,Framed-Protocol = PPP
</AuthBy SQL>
##########################################################
The problem i am facing is Radius is not replying the session-timeout value.
I have checked the query and it is correct, when i normally execute the
query it executes correctly.
Here is a snapshot of Trace 4 for radius.
I have replaced the NAS-IP by xxx.xxx.xxx.xxx
######################Trace 4 debug ########################
*** Received from XXX.XXX.XXX.XXX port 8001 ....
Code: Access-Request
Identifier: 148
Authentic: N<177><221>n;<207><156>^9<170><16><187><211><166><192>(
Attributes:
User-Name = "test"
User-Password =
"<231><27>e<174><28><240><142>;<140><142><235><220><152>)<127><229>"
NAS-Port = 139
NAS-Port-Type = Async
Service-Type = Framed
Framed-Protocol = PPP
NAS-Identifier = "XXX.XXX.XXX.XXX"
Sat Nov 18 13:48:44 2000: DEBUG: Handling request with Handler 'Realm='
Sat Nov 18 13:48:44 2000: DEBUG: OnlineUsers Deleting session for test,
XXX.XXX.XXX.XXX, 139
Sat Nov 18 13:48:44 2000: DEBUG: do query is: delete from RADONLINE where
NASIDENTIFIER='XXX.XXX.XXX.XXX' and NASPORT=0139
Sat Nov 18 13:48:44 2000: DEBUG: Query is: select NASIDENTIFIER, NASPORT,
ACCTSESSIONID, FRAMEDIPADDRESS from RADONLINE where USERNA
ME='test'
Sat Nov 18 13:48:44 2000: DEBUG: Handling with Radius::AuthSQL
Sat Nov 18 13:48:44 2000: DEBUG: Handling with Radius::AuthSQL
Sat Nov 18 13:48:44 2000: DEBUG: Radius::AuthSQL looks for match with test
Sat Nov 18 13:48:44 2000: DEBUG: Handling with Radius::AuthSQL
Sat Nov 18 13:48:44 2000: DEBUG: Handling with Radius::AuthSQL
Sat Nov 18 13:48:44 2000: DEBUG: Query is: select
password,(least(balancetime,(time_to_sec('14:00:00')-time_to_sec(current_tim
e)))) as session from amcard where (username='test' and
'05:00:00'<=current_time and '14:00:00'> current_time and status = 1 and
balancetime>0 and (expiry_date is null or expiry_date > now()) )
Sat Nov 18 13:48:44 2000: DEBUG: Radius::AuthSQL looks for match with test
Sat Nov 18 13:48:44 2000: DEBUG: Radius::AuthSQL ACCEPT:
Sat Nov 18 13:48:44 2000: DEBUG: Access accepted for test
Sat Nov 18 13:48:44 2000: DEBUG: Packet dump:
*** Sending to XXX.XXX.XXX.XXX port 8001 ....
Sat Nov 18 13:48:44 2000: DEBUG: Radius::AuthSQL looks for match with test
Sat Nov 18 13:48:44 2000: DEBUG: Radius::AuthSQL ACCEPT:
Sat Nov 18 13:48:44 2000: DEBUG: Access accepted for test
Sat Nov 18 13:48:44 2000: DEBUG: Packet dump:
*** Sending to XXX.XXX.XXX.XXX port 8001 ....
Code: Access-Accept
Identifier: 148
Authentic: N<177><221>n;<207><156>^9<170><16><187><211><166><192>(
Attributes:
Service-Type = Framed
Framed-Protocol = PPP
Sat Nov 18 13:48:44 2000: ERR: Attribute number 17 (vendor 5) is not defined
in your dictionary
Sat Nov 18 13:48:44 2000: DEBUG: Packet dump:
*** Received from XXX.XXX.XXX.XXX port 8002 ....
Code: Accounting-Request
Identifier: 101
Authentic: <241><239><152><205><135><243>FBr<177><175>FN<131><135><151>
Attributes:
User-Name = "test"
NAS-Port = 139
NAS-Port-Type = Async
Service-Type = Framed
Framed-Protocol = PPP
NAS-Identifier = "XXX.XXX.XXX.XXX"
Acct-Status-Type = Start
Acct-Delay-Time = 0
Acct-Session-Id = "001118.140406.000149"
Acct-Authentic = RADIUS
Framed-IP-Address = XXX.XXX.XXX.XXX
Sat Nov 18 13:48:44 2000: DEBUG: Handling request with Handler 'Realm='
Sat Nov 18 13:48:44 2000: DEBUG: OnlineUsers Adding session for test,
XXX.XXX.XXX.XXX, 139
Sat Nov 18 13:48:44 2000: DEBUG: do query is: delete from RADONLINE where
NASIDENTIFIER='XXX.XXX.XXX.XXX' and NASPORT=0139
Sat Nov 18 13:48:44 2000: DEBUG: do query is: insert into RADONLINE
(USERNAME, NASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP,FRA
MEDIPADDRESS, NASPORTTYPE, SERVICETYPE, CALLEDSID,CLIENTIPADDRESS) values
('test', 'XXX.XXX.XXX.XXX', 139, '001118.140406.000149', 974
544524, 'XXX.XXX.XXX.XXX','', 'Framed', '','XXX.XXX.XXX.XXX')
Sat Nov 18 13:48:44 2000: DEBUG: Handling with Radius::AuthSQL
Sat Nov 18 13:48:44 2000: DEBUG: Handling accounting with Radius::AuthSQL
######################Trace 4 debug end########################
If taken a look at the Radius reply attributes it is only showing
Attributes:
Service-Type = Framed
Framed-Protocol = PPP
Session-Timeout is missing.
I am using mysql version 3.22.25 with Radius 2.16.3 on sun-solaris
I have checked the query normally and it works fine.
Any suggesstions!!!
thanx in advance
Best Regards
Hakim
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.