Hello everybody.

I found the problem with DefaultSimultaneousUse I posted few
days ago. The problem was that snmpget program got a

(geError) general failure occure.

I saw that somebody before (in sept. 2000) got the same
problem. I took a look into the mail list database but I
didn't find what that user of radiator did for fix the
problem. Well I took a look into the Nas.pm file and I found
the next "curious" thing. In the radiator version. 2.15 (the
version I was using before upgrading to 2.17.1), the
TotalControlSNMP sub routine use the next code:

sub isOnlineTotalControlSNMP
{
    my ($name, $nas_id, $nas_port, $session_id, $client) =
@_;

    return 1 unless &Radius::SNMP::snmpgetprogExists();

    my $portidx = 1256 + $nas_port;
    my $result = &Radius::SNMP::snmpget($nas_id,
                         $client->{SNMPCommunity},
                         "$Radius::Nas::TCMIB.4.10.1.1.18.$portidx");
    if ($result =~ /^.*\"([^"]+)".*$/)
    {
        return $1 eq $name;
    }
    return 0;
}

well, that version of TotalControlSNMP worked for me pretty
well.

I just imagined that maybe the problem wasn't the snmpget
program itself, but the OID radiator is asking for, so I
took a look into the Nas.pm from radiator 2.17.1 (the
version I'm using now). This is what I found:

sub isOnlineTotalControlSNMP
{
    my ($name, $nas_id, $nas_port, $session_id, $client) =
@_;
     
    return 1 unless &Radius::SNMP::snmpgetprogExists();

    # Adjusted algorithm contributed by Aaron Nabil
<[EMAIL PROTECTED]>
    my $oid = length $session_id;
    my $x;
    foreach $x (unpack('C*', $session_id))  
    {
        $oid .= ".$x";
    }
     
    my $result = &Radius::SNMP::snmpget   
        ($nas_id, $client->{SNMPCommunity},
         "$Radius::Nas::TCMIB.4.2.1.140.1.2.$oid");
    
    return ($result =~ /^.*\"([^"]+)".*$/ && $1 eq $name);
}


as you can see, the OID used in 2.17.1 is different from the
OID used in 2.15.

Can somebody tell me why those sub routines changed?,
because I took a look into the revision history from
radiator's page but I didn't find any reference for that
change.


Thanks in advance for the help.


/Sergio

===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to