Issue with a new module and radiusd: symbol lookup error

Luca Adamo lucamerica at
Tue Sep 23 16:02:21 CEST 2008

..moved from freeradius-users to freeradius-devel

>  I would suggest *not* re-writing the SQL module.
>  Instead, look at rlm_sqlippool in  It leverages  
> an
> existing SQL module to do additional queries.  It means that you don't
> have to duplicate all of the functionality of rlm_sql.  And you don't
> have to duplicate all of the MySQL/PostgreSQL/Oracle/etc drivers,  
> either.
>  Plus, rlm_sqlippool.c is a *lot* easier to understand than rlm_sql.
>  Alan DeKok.

Hi again,

my goal is to implement a module compliant with the Wimax Forum for  
what concerns authentication and authorization of supplicants. For  
this reason I needed to access the database where I store the various  
root-key (I mean DHCP-RK, and MIP-RK) as well as all the other keying- 
related items needed by the WF St.3. My module so have to interact  
with MySQL, and with OpenSSL (for key-gen) and operate both in  
postauth and in authorize (to handle request coming from  
unconventional NAS such as DHCP-Servers or Home Agents asking for keys).

I found it simpler at the beginning to write down a new module (please  
note that we started our development when the current version of  
FreeRADIUS was 2.0.4...i.e. no rlm_wimax module was present) instead  
of getting one of the other working properly. I think that youìre  
right when you say that the code of sql_init_socketpool is missing  
from my module and this can also explain why it works only in postauth.

In my opinion when the sql module is called (for example during  
authentication) it creates the symbols it needs (among them  
sql_init_socketpool). But if I try to call my module before sql (i.e.  
at the beginning of authorize) the symbols are missing and the symbol  
lookup error occurs. Am i right?

I'll try to follow your guideline and to look at the existent modules.  
My schema is the default one with a bunch of tables used for WiMAX  
dynamic keys. I mean that the original structure is conserved and that  
I'm using the header file and the conf.h file to "load" the queries.  
Anyway if you need the schema I'll mail to you.



Pasting the sql_init_socketpool() in my module simply shift the  
"symbol lookup error" on the following symbol. It seems I have to  
paste into my module half sql.c and I don't want to do that since  
you're right when u say that it is pointless to rewrite sql.c.

More information about the Freeradius-Devel mailing list