Segmentation fault after migrating from 2.0.5 to 2.1.1

Dmitry V. Krivenok krivenok at orangesystem.ru
Mon Oct 27 14:54:51 CET 2008


Hello!

I'm developing my own rlm.
I copied the code below from rlm_example.c:

    /*
     *  Look for the 'state' attribute.
     */
    state =  pairfind(request->packet->vps, PW_STATE);
    if (state != NULL) {
        RDEBUG("Found reply to access challenge");
        return RLM_MODULE_OK;
    }

After compiling my module under fr-2.1.1 I got segmentation fault.

gdb determined that error occurs in pairfind:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7ba4ac0 (LWP 9773)]
0xb7b360fa in osb_authorize (inst=0x8179e30, request=0x819c670) at 
rlm_osb.c:73
73        if(pairfind(request->packet->vps, PW_STATE))

I found that request->packet is NULL.

Is it correct request?
How should I handle requests with packet field == NULL?

Thank you beforehand!

P.S.
All worked fine with fr-2.0.5.



More information about the Freeradius-Devel mailing list