[RADIATOR] simple NoReplyHook?

Kiernan Mccoll kiernan at staff.iinet.net.au
Thu May 28 04:33:39 CDT 2009


Here's a simple NoReplyHook I am using atm, this is the whole contents of the file.

sub {
        my $originalrequest     = ${$_[0]};
        my $senttoproxy         = ${$_[1]};
        my $replytonas          = ${$_[2]};

        my @radiusattributes = (
                $originalrequest->{'OriginalUserName'},
                $originalrequest->get_attr('NAS-IP-Address'),
                $originalrequest->get_attr('NAS-Port'),
                $originalrequest->get_attr('Called-Station-Id'),
                $originalrequest->get_attr('Calling-Station-Id'),
                $originalrequest->get_attr('Acct-Session-Id'),
        );

# You will probably want to add this in:
# Make sure the attribute (and its value if its an integer mapped one) are in your dictionary
#       $originalrequest->{RadiusResult} = $main::REJECT;
#       $replytonas->add_attr('Whatever-Attr', 'something');


        my $logstring = "TIMEDOUT|";

        $logstring .= join('|', @radiusattributes);

        &main::log($main::LOG_ERR, "$logstring");
};

-----Original Message-----
From: radiator-bounces at open.com.au [mailto:radiator-bounces at open.com.au] On Behalf Of Peter Havekes
Sent: Thursday, May 28, 2009 4:33 PM
To: radiator at open.com.au
Subject: [RADIATOR] simple NoReplyHook?

Hello,

To make it easyer determining what went wrong in the chain of (eduroam)
radius-servers I'm thinking of adding a NoReplyHook to the <AuthBy
Radius>. Instead of not responding if the remote server did not reply I
want to reply ACCESS-REJECT and add some attribute stating what server
did not respond in time.

This probably is an simple perl-sub, but I'm terrible at writing perl.
Is anyone already using such an NoReplyHook, or willing to type these
few lines of Perl?

Thanks in advance.


--

Peter Havekes
ICT-Ontwikkeling & AVANS-CSIRT
Avans Hogeschool
Onderwijsboulevard 215
5223 DE 's-Hertogenbosch
Telefoon    0736 295 592
Mobiel       0612917383
Fax           0736295488
email/msn p.havekes at avans.nl


- Have you got anything without Spam in it?
- Well, there's Spam egg sausage and Spam, that's not got much Spam in it.

---------------------------------------------------------------------------
Op deze e-mail zijn de volgende voorwaarden van toepassing:
The following conditions apply to this e-mail:
http://emaildisclaimer.avans.nl
---------------------------------------------------------------------------

_______________________________________________
radiator mailing list
radiator at open.com.au
http://www.open.com.au/mailman/listinfo/radiator



More information about the radiator mailing list