[RADIATOR] AuthBy INTERNAL not sending reply after several AuthBy RADIUS

Tim Jones tim.jones at fon.com
Tue Sep 24 09:47:03 CDT 2013


Hi all,

I have a Radiator 4.11 instance which proxies RADIUS requests to several
other RADIUS servers by means of a ReplyHook in each AuthBy RADIUS section,
similar to the code below.

--- ReplyHook.pm ---
sub {
    my $p = ${$_[0]};
    my $rp = ${$_[1]};
    my $op = ${$_[2]};
    my $sp = ${$_[3]};

    if($p->code eq 'Access-Accept')
    {
        my $auth;
        if($auth = Radius::AuthGeneric::find('radius_partner'))
        {
             my ($rc, $reason) = $auth->handle_request($op);
             if($rc != $main::REJECT)
             {
                 $op->{RadiusResult} = $main::IGNORE;
                 return;
             }
        }
    }
    $op->{RadiusResult} = $main::REJECT;
}
~~~ ReplyHook.pm ~~~

I have added an AuthBy INTERNAL at the end of the 'chain' which just dumps
some of the attributes into a database. An example of it is below.

--- RequestHook.pm ---
sub {
    my $p = ${$_[0]};
    my $rp = ${$_[1]};

    # INSERT into DB here

    return($main::ACCEPT);
}
~~~ RequestHook.pm ~~~

The debug output from the server shows the database being updated and
returning ACCEPT, but then never sends out the Access-Accept response
packet back to the NAS.

I have a feeling it is because of setting the $op to IGNORE when forwarding
the request, but the RequestHook of AuthBy INTERNAL doesn't pass it as a
parameter so I cannot modify its' RadiusResult.

Am I trying to solve this problem the wrong way, or have I forgotten
something?

Many thanks,

Tim Jones
*Platform Engineering
*
**
**
tim.jones at fon.com
Skype: Tim.Jones.Fon

C/ Quintanavides 15. Edificio 2, Planta 1ª
Parque Empresarial Vía Norte, de Metrovacesa
28050 Las Tablas. Madrid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20130924/7e9fd454/attachment.html 


More information about the radiator mailing list