Commit 62683b71 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Fixed radius class names

parent a7b6aa73
......@@ -28,7 +28,7 @@ use IO::Select;
use IO::Socket;
use smradius::version;
use Radius::Packet;
use smradius::Radius::Packet;
# Check Config::IniFiles is instaslled
if (!eval {require Config::IniFiles; 1;}) {
......@@ -114,7 +114,7 @@ sub run
# Time to start loading the dictionary
print(STDERR "Loading dictionaries...");
my $raddb = Radius::Dictionary->new();
my $raddb = smradius::Radius::Dictionary->new();
# Look for files in the dir
opendir(my $DIR, $cmdline->{'raddb'})
......@@ -150,7 +150,7 @@ sub run
print(STDERR "\nRequest:\n");
print(STDERR " > Secret => '$secret'\n");
# Build packet
my $pkt = Radius::Packet->new($raddb);
my $pkt = smradius::Radius::Packet->new($raddb);
$pkt->set_code($pkt_code);
# Generate identifier
my $ident = int(rand(32768));
......@@ -228,7 +228,7 @@ sub run
}
# Parse packet
$pkt = Radius::Packet->new($raddb,$udp_packet);
$pkt = smradius::Radius::Packet->new($raddb,$udp_packet);
print(STDERR " > Authenticated: ". (defined(auth_req_verify($udp_packet,$secret,$authen)) ? "yes" : "no") ."\n");
print(STDERR $pkt->str_dump());
......
......@@ -64,8 +64,8 @@ use Time::HiRes qw( gettimeofday tv_interval );
use AWITPT::DB::DBILayer;
use AWITPT::Util qw( booleanize );
use Radius::Packet;
use smradius::Radius::Packet;
use smradius::version;
use smradius::constants;
use smradius::daemon::request;
......@@ -352,7 +352,7 @@ sub post_configure_hook {
# Load dictionaries
$self->log(LOG_INFO,"[SMRADIUS] Initializing dictionaries...");
my $dict = Radius::Dictionary->new();
my $dict = smradius::Radius::Dictionary->new();
foreach my $df (@{$config->{'dictionary_list'}}) {
# Load dictionary
if (!$dict->readfile($df)) {
......@@ -769,7 +769,7 @@ sub process_request {
}
# Tell the NAS we got its packet
my $resp = Radius::Packet->new($self->{'radius'}->{'dictionary'});
my $resp = smradius::Radius::Packet->new($self->{'radius'}->{'dictionary'});
$resp->set_code('Accounting-Response');
$resp->set_identifier($pkt->identifier);
$resp->set_authenticator($pkt->authenticator);
......@@ -832,7 +832,7 @@ sub process_request {
if ($PODUser) {
$self->log(LOG_DEBUG,"[SMRADIUS] POST-ACCT: Trying to disconnect user...");
my $resp = Radius::Packet->new($self->{'radius'}->{'dictionary'});
my $resp = smradius::Radius::Packet->new($self->{'radius'}->{'dictionary'});
$resp->set_code('Disconnect-Request');
my $id = $$ & 0xff;
......@@ -1073,7 +1073,7 @@ sub process_request {
$self->log(LOG_DEBUG,"[SMRADIUS] Authenticated and authorized");
$logReason = "User Authorized";
my $resp = Radius::Packet->new($self->{'radius'}->{'dictionary'});
my $resp = smradius::Radius::Packet->new($self->{'radius'}->{'dictionary'});
$resp->set_code('Access-Accept');
$resp->set_identifier($pkt->identifier);
$resp->set_authenticator($pkt->authenticator);
......@@ -1218,7 +1218,7 @@ CHECK_RESULT:
$self->log(LOG_DEBUG,"[SMRADIUS] Authentication or authorization failure");
$logReason = "User NOT Authenticated or Authorized";
my $resp = Radius::Packet->new($self->{'radius'}->{'dictionary'});
my $resp = smradius::Radius::Packet->new($self->{'radius'}->{'dictionary'});
$resp->set_code('Access-Reject');
$resp->set_identifier($pkt->identifier);
$resp->set_authenticator($pkt->authenticator);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment