<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi everybody,<div><br></div><div>I'm using a self compiled version of FreeRADIUS 2.1.0 on a Linux x86 box running ubuntu 8.04 updated. </div><div>I've been able to succesfully install and configure the server and to run some test using a D-Link access-point getting a regular Access-Accept.</div><div><br></div><div>My troubles started when I decided to implement a new module. My module has a structure similar to the sql module in fact it is used to query a MySQL database. I have been able to make this module connect to the database and to perform some operation on the reply packet during the postauth phase (basically adding attributes).</div><div><br></div><div>I also wanted to use this module, rlm_wimax_qos, in the authorize phase but here I got stuck because a symbol lookup error. </div><div><br></div><div><b>I'm providing all the details I can, first of all the final part of </b><i><b>radiusd -X</b></i><b> command:</b></div><div><br></div><div><div><i>Module: Linked to module rlm_wimax_qos</i></div><div><i> Module: Instantiating wimax_qos</i></div><div><i> wimax_qos {</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>driver = "rlm_sql_mysql"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>server = "localhost"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>port = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>login = "root"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>password = "rootpass"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>radius_db = "radiusDB"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>read_groups = yes</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>sqltrace = no</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>sqltracefile = "/usr/local/var/log/radius/sqltrace.sql"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>readclients = no</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>deletestalesessions = yes</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>num_sql_socks = 5</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>sql_user_name = "%{User-Name}"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>default_user_profile = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>nas_query = "SELECT id,nasname,shortname,type,secret FROM nas"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>authorize_check_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>authorize_reply_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>authorize_group_check_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>authorize_group_reply_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>accounting_onoff_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>accounting_update_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>accounting_update_query_alt = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>accounting_start_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>accounting_start_query_alt = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>accounting_stop_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>accounting_stop_query_alt = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>connect_failure_retry_delay = 60</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>simul_count_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>simul_verify_query = ""</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>postauth_query = "INSERT into radpostauth (user, pass, reply, date) values ('%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>qos_profile_query = "SELECT qos_id FROM class_table WHERE EAP_Inner_GID='%{reply:EAP-Inner-GID}' AND EAP_Outer_GID='%{reply:EAP-Outer-GID}'"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>qos_get_attribute_query = "SELECT id,qos_id,attribute,value,op FROM qos_profile_table WHERE qos_id=%{reply:Qos_Id}"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>nas_capability_query = "SELECT NAS_DHCP_Support,DHCP_Proxy_Relay,MIP_FA_Address,type,nasname FROM nas_table WHERE nasname='%{NAS-IP-Address}'"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>dhcp_sec_assoc_query = "SELECT DHCP_RK_Key_ID,DHCP_RK_Lifetime,DHCP_RK FROM dhcp_handling_table WHERE DHCPv4_Server='%{reply:WiMAX-DHCPv4-Server}'"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>dhcp_sec_existid_query = "SELECT DHCP_RK_Key_ID,DHCP_RK_Lifetime,DHCP_RK FROM dhcp_handling_table WHERE DHCP_RK_Key_ID ='%{packet:WiMAX-DHCP-RK-Key-Id}'"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>dhcp_sec_update_query = "INSERT INTO dhcp_handling_table (DHCPv4_Server,DHCP_RK_Key_ID,DHCP_RK_Lifetime,DHCP_RK) VALUES ('%{reply:WiMAX-DHCPv4-Server}','%{reply:gen_WiMAX-DHCP-RK-Key-ID}','%{reply:gen_WiMAX-DHCP-RK-Lifetime}','%{reply:gen_WiMAX-DHCP-RK}')"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>dhcp_rm_old_key_query = "DELETE FROM dhcp_handling_table WHERE DHCPv4_Server='%{reply:WiMAX-DHCPv4-Server}'"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>static_only_config = "1"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>dhcp_rk_timeout = "36000"</i></div><div><span class="Apple-tab-span" style="white-space:pre"><i> </i></span><i>safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"</i></div><div><i> }</i></div><div><i>rlm_sql (wimax_qos): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked</i></div><div><i>rlm_sql (wimax_qos): Attempting to connect to root@localhost:/radiusDB</i></div><div><i>radiusd: symbol lookup error: /usr/local/lib/rlm_wimax_qos-2.1.0.so: undefined symbol: sql_init_socketpool</i></div><div><i><br></i></div><div><b>Then I'm also providing the relevant portion of the radiusd.conf file.</b></div><div><b>Please note that no problems occur if I only "call" the module during postauth. In this phase the module's behaviour is the one expected.</b></div><div><b><br></b></div><div><b><div><span class="Apple-style-span" style="font-weight: normal;"><i>authorize {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> preprocess</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> auth_log</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> wimax_qos</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> eap</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>}</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>authenticate {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> eap</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> mschap</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>}</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>preacct {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> preprocess</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> acct_unique</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> suffix</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> files</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>}</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>accounting {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> detail</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> radutmp</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> sql</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>}</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>session {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> radutmp</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> sql</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>}</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>post-auth {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> wimax_qos</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>}</i></span></div><div><br></div></b></div><div><b>Finally I can provide the last part of the module code, the one where I set the function that serves as an entry point during the authorize phase.</b></div><div><b><br></b></div><div><b><div><span class="Apple-style-span" style="font-weight: normal;"><i>module_t rlm_wimax_qos = {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> RLM_MODULE_INIT,</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> "wimax_qos",</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> RLM_TYPE_THREAD_SAFE, /* type */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> wimax_qos_instantiate, /* instantiation */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> wimax_qos_detach, /* detach */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> {</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> NULL, /* authentication */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> wimax_qos_authorize, /* authorization */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> NULL, /* preaccounting */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> NULL, /* accounting */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> NULL, /* checksimul */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> NULL, /* pre-proxy */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> NULL, /* post-proxy */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> wimax_qos_postauth, /* post-auth */</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i> },</i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i>};</i></span></div><div><br></div><div><span class="Apple-style-span" style="font-weight: normal;">I have tried by best to understand where the error below comes from. Compiling goes fine, no errors are found. If I put the module under authorize in radiusd.conf the error happen, otherwise everything is going fine (but nothing of what i want is performed during authorize). I'm keeping saying this because I want to point out that the issue is configuration dependent and that my code works in certain circumstances (i.e. the symbol is not missing from the dynamic library).</span></div><div><span class="Apple-style-span" style="font-weight: normal;"><br></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><div><i><b>rlm_sql (wimax_qos): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked</b></i></div><div><i><b>rlm_sql (wimax_qos): Attempting to connect to root@localhost:/radiusDB</b></i></div><div><i><b>radiusd: symbol lookup error: /usr/local/lib/rlm_wimax_qos-2.1.0.so: undefined symbol: sql_init_socketpool</b></i></div></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><br></span></div><div><span class="Apple-style-span" style="font-weight: normal;">If someone has a clue everything is welcome, and If more details are needed I can do my best to provide them.</span></div><div><span class="Apple-style-span" style="font-weight: normal;"><br></span></div><div><span class="Apple-style-span" style="font-weight: normal;">Thank you,</span></div><div><span class="Apple-style-span" style="font-weight: normal;"><br></span></div><div><span class="Apple-style-span" style="font-weight: normal;">Lu</span></div><div><span class="Apple-style-span" style="font-weight: normal;"><i><br></i></span></div><div><span class="Apple-style-span" style="font-weight: normal;"><div><i><br></i></div></span></div></b></div></div></body></html>