where to insert my code to return custom reply to the client
Hi, all! I am now using a WiMAX network and I want to use freeradius+mysql (and EAP, TLS) for it. Now I need to add some new attribute (such as the service level for a single client) in the mysql database. And then the freeradius server can return the attribute to tell the AGW. I have looked up some methods on the Internet and I found these pages: http://ubuntuforums.org/showthread.php?t=151781 http://www.frontios.com/freeradius.html
From the above two links, I have a basic idea. I think I can create a new table in the databse to store the new attribute like this: user1 attribute-value-user1 user1 attribute-value-user2 ....
Then as stated in http://www.frontios.com/freeradius.html, the rlm_sql is responsible for return some pre-defined attributes to the AGW and SS. Then I write some code in rlm_wimax.c to query the database for the new defined attribute and return it to the AGW to let it know. I don't know it is right? Or otherwise I should write my db operation code in rlm_sql? Thanks a lot for your kindly help!
weiwei fang wrote:
I am now using a WiMAX network and I want to use freeradius+mysql (and EAP, TLS) for it. Now I need to add some new attribute (such as the service level for a single client) in the mysql database. And then the freeradius server can return the attribute to tell the AGW.
I have looked up some methods on the Internet and I found these pages:
Why? Could you *please* try reading the documentation that comes with FreeRADIUS? I mean, go to http://freeradius.org, and click on either the "doc" link, or the "wiki" link. You will see a *lot* of documentation.
From the above two links, I have a basic idea. I think I can create a new table in the databse to store the new attribute like this: user1 attribute-value-user1 user1 attribute-value-user2
Type "sql" into the search box on the Wiki, and you'll get lots of documentation about the SQL module. Or... read the file doc/rlm_sql, which comes with the server.
Then as stated in http://www.frontios.com/freeradius.html, the rlm_sql is responsible for return some pre-defined attributes to the AGW and SS.
Mostly, yes.
Then I write some code in rlm_wimax.c to query the database for the new defined attribute and return it to the AGW to let it know.
No.
I don't know it is right? Or otherwise I should write my db operation code in rlm_sql?
Why would you write any C code? It isn't necessary. Alan DeKok.
It's actually easier than all that. I assume you need to send back to the NAS a particular string in order to provision the CPE to a particular service flow or set of service flows. Simply use a reply or group reply attribute. Most WiMax base stations can read Framed-Filter-ID or Filter-ID="service_flow_attrribute_here" if you send it in your authentication reply. David From: freeradius-users-bounces+david.peterson=acc-corp.net@lists.freeradius.org [mailto:freeradius-users-bounces+david.peterson=acc-corp.net@lists.freeradiu s.org] On Behalf Of weiwei fang Sent: Sunday, May 23, 2010 9:55 PM To: freeradius-users@lists.freeradius.org Subject: where to insert my code to return custom reply to the client Hi, all! I am now using a WiMAX network and I want to use freeradius+mysql (and EAP, TLS) for it. Now I need to add some new attribute (such as the service level for a single client) in the mysql database. And then the freeradius server can return the attribute to tell the AGW. I have looked up some methods on the Internet and I found these pages: http://ubuntuforums.org/showthread.php?t=151781 http://www.frontios.com/freeradius.html
From the above two links, I have a basic idea. I think I can create a new table in the databse to store the new attribute like this: user1 attribute-value-user1 user1 attribute-value-user2 ....
Then as stated in http://www.frontios.com/freeradius.html, the rlm_sql is responsible for return some pre-defined attributes to the AGW and SS. Then I write some code in rlm_wimax.c to query the database for the new defined attribute and return it to the AGW to let it know. I don't know it is right? Or otherwise I should write my db operation code in rlm_sql? Thanks a lot for your kindly help!
participants (3)
-
Alan DeKok -
David Peterson -
weiwei fang