radiusplugin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Radiusplugin-devel] Segmentation fault bug detected and fixed...


From: Sameh Shaker
Subject: [Radiusplugin-devel] Segmentation fault bug detected and fixed...
Date: Tue, 1 Nov 2011 16:53:33 +0200

Dears,
When the plugin is in accountingonly=true mode, closing openvpn will cause a segmentation fault causing all sorts of accounting loss, and NULL end time for sessions ...

When it's in accounting only mode *context->getThread() would always return 0 causing a segmentation fault on the call pthread_join(*context->getThread(),NULL) in radiusplugin.cpp ...

So a simple dirty workaround was to the following :

radiusplugin.cpp:682

        //wait for the thread to exit
            if (*context->getThread()!=0){
                pthread_join(*context->getThread(),NULL);
                pthread_cond_destroy(context->getCondSend( ));
                pthread_cond_destroy(context->getCondRecv( ));
                pthread_mutex_destroy(context->getMutexSend());
                pthread_mutex_destroy(context->getMutexRecv());
            }

Just did the trick, and now openvpn closes cleanly, closing all accounting sessions....

--
Thanks and best regards,
Sameh M Shaker

reply via email to

[Prev in Thread] Current Thread [Next in Thread]