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

memo: patch for RadiusPerl-0.05



 
    
Patch for RadiusPerl-0.0.5:

[terrence@claret Authen]$ diff Radius.pm Radius.pm.orig 
110,112c110
<               { Name => 2, Value => $pwd }, 
<		{ Name => 4, Value => '127.0.0.1', Type => 'ipaddr' },
<		{ Name => 6, Value => 8}
---
>               { Name => 2, Value => $pwd }

4   NAS-IP-Address
6   Service-Type    Authenticate Only (8)


Here is a script for test:

$r = new Authen::Radius(Host => $host, Secret => $secret, Timeout => $timeout);
Authen::Radius->load_dictionary ( "./dictionary" );

# Value for Service-Type: 8 - Authenticate Only
$servicevalue = 8;

$r->add_attributes (
    { Name => 'User-Name', Value => $user },
    { Name => 'Password', Value => $pwd },
    { Name => 'Service-Type', Value => $servicevalue },
    { Name => 'NAS-IP-Address', Value => '127.0.0.1', Type => 'ipaddr' }
);

$returncode = $r->send_packet (1) and $type = $r->recv_packet;

Google