(RADIATOR) unblessed reference

Alex Sharaz A.Sharaz at hull.ac.uk
Tue Jun 17 09:22:34 CDT 2008


Hi,
I'm trying to set up a post processing hook that'll return a vlan id in
an
access-reject packet. The vlan id value is dependent upon the nas ip
address
that initially did the access-request. I'm running radiator 4.2

A snippet of the perl hook is :-

sub
{
        my ($req, $rep, $handled, $reason) = @_;

#
# $p=current request
# $rp=response packet
# $result result of the authentication
#
    my $vlanid='-1';
    my $tag;
    my $ASCIIvlan;
    my $nasip = $req->getNasId();

    &main::log($main::LOG_DEBUG, "Calling db2_gen_vlanid.pl\n");
    if (${$rep}->code() eq 'Access-Accept' )
    {

..........
    }
    If ((${$rep}->code() eq 'Access-Reject' )
    {
.....
    }
 
Below is what happens when an incoming access request occurs. (
basically we
want to reject any auth requests from host machines and tell the switch
to
place the port in an appropriate default vlan)


*** Received from 150.237.162.254 port 2440 ....
Code:       Access-Request
Identifier: 112
Authentic:  <242>,\<172>1M2<175><135>=<143>;>n<197><170>
Attributes:
        Framed-MTU = 1466
        NAS-IP-Address = 150.237.162.254
        NAS-Identifier = "CC_PC2_HP2900-48"
        User-Name = "host/to55er.adir.hull.ac.uk"
        Service-Type = Framed-User
        Framed-Protocol = PPP
        NAS-Port = 30
        NAS-Port-Type = Ethernet
        NAS-Port-Id = "30"
        Called-Station-Id = "00-1c-2e-11-4b-40"
        Calling-Station-Id = "00-13-d3-c9-24-d0"
        Connect-Info = "CONNECT Ethernet 1000Mbps Full duplex"
        Tunnel-Type = 0:VLAN
        Tunnel-Medium-Type = 0:802
        Tunnel-Private-Group-ID = 1620
        EAP-Message = <2><18><0> <1>host/to55er.adir.hull.ac.uk
        Message-Authenticator =
<175><26><215>1<229><221><10><210><154><210><183><146>rb<219><229>

Mon Jun 16 11:56:05 2008: DEBUG: Handling request with Handler
'Client-Identifier=/^HP/,Realm=,User-Name=/^host/>'
Mon Jun 16 11:56:05 2008: DEBUG: Handling with AuthINTERNAL:
rejectAuthAttempt
Mon Jun 16 11:56:05 2008: DEBUG: AuthBy INTERNAL result: REJECT, "Realm
required/Machine auth not allowed"
Mon Jun 16 11:56:05 2008: INFO: Access rejected for
host/to55er.adir.hull.ac.uk: "Realm required/Machine auth not allowed"
Mon Jun 16 11:56:05 2008: DEBUG: do query is: 'insert into
db2inst3.RADAUTHLOG (TIME_STAMP, USERNAME, AUTH_TYPE,
REASON,radauth_xml)
values (1213613
765, 'host/to55er.adir.hull.ac.uk', 0, '"Realm required/Machine auth not
allowed"','<radauthrec><time_stamp>1213613765</time_stamp><username>host
/to
55er.adir.hull.ac.uk</username><auth_type>fail</auth_type><reason/></rad
auth
rec>')': 
Mon Jun 16 11:56:05 2008: ERR: Error in PostProcessingHook(): Can't call
method "getNasId" on unblessed reference at (eval 202) line 23.

So how do i get round the unblessed reference?
Alex

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://www.open.com.au/pipermail/radiator/attachments/20080617/36f9782d/attachment.ksh>


More information about the radiator mailing list