rlm_perl issues, patch

Eike Dehling eike at quarantainenet.nl
Tue Nov 29 14:52:11 CET 2011


Hi List,

we use freeradius for authentication wireless users and use rlm_perl to 
integrate perl scripts which determine e.g. vlan info from our database 
and lookup the users password.

I was having some issues with freeradius segfaulting. In debug mode (-X) 
everything worked, but normal mode (multithreaded) it segfaults. The 
segfault would be at a seemingly random place in the perl library.

The solution was in the way rlm_perl calls perl_clone (for creating 
perl-threads). The perl docs say this must be done one after the other, 
not in parallel. By adding a mutex around the perl_clone calls, the 
problem went away.

I have attached a patch which solved the problem for me. Perhaps this 
patch is of use to someone else.

Suggestions and improvements are welcome?

Eike Dehling
Quarantainenet

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rlm_perl_clone_mutex.patch
Type: text/x-patch
Size: 1265 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20111129/94af36bc/attachment.bin>


More information about the Freeradius-Devel mailing list