Hello Antonio -
On Wed, 17 Nov 1999, Antonio Navarro Navarro wrote:
> Hi all !
>
> I have defined the field FramedGroupBaseAddress in the <Client> section of my
>radiator.cfg file, and FramedGroup 0 in the <AuthbySQL> Section. The lines are like
>this:
>
> <Client ....>
> ....
> FramedGroupBaseAddress 212.87.203.1
> </Client>
>
> <AuthBy SQL>
> FramedGroup 0
> .....
> </AuthBy SQL>
>
> *** Received from 212.87.192.2 port 2484 ....
> Code: Access-Request
> Identifier: 133
> Authentic: "%<1> 5<11>/<13>*<2><0><0><129><218><240><3>
> Attributes:
> User-Name = "jennifer@bemarnet"
> CHAP-Password = *******
> NAS-IP-Address = 195.76.180.22
> NAS-Port = 324
> NAS-Port-Type = ISDN
> Calling-Station-Id = "9654197740000000000000000"
> Connect-Info = "64000"
>
> Tue Nov 16 11:00:38 1999: DEBUG: Radius::AuthSQL ACCEPT:
> Tue Nov 16 11:00:38 1999: DEBUG: FramedGroup 0 address is being assigned
> Tue Nov 16 11:00:38 1999: DEBUG: Access accepted for jennifer@bemarnet
> Tue Nov 16 11:00:38 1999: DEBUG: Packet dump:
> *** Sending to 212.87.192.2 port 2484 ....
> Code: Access-Accept
> Identifier: 133
> Authentic: "%<1> 5<11>/<13>*<2><0><0><129><218><240><3>
> Attributes:
> Service-Type = Framed-User
> Framed-IP-Address = 212.87.204.70
>
> The IP Address is 212.87.204.70 instead of 212.87.203.70
>
This is the correct behaviour. There are large NAS's out there with more than
255 channels and this is why it works like this. Here's the code:
# Figure out an address to allocate
my $base = $p->{Client}->{FramedGroupBaseAddress}[$value];
if (defined $base)
{
my @base = split(/\./, $base);
my $port = $p->getAttrByNum($Radius::Radius::NAS_PORT);
# Compute octet 4 of the IP address
my $o4 = $base[3]
+ ($port % $p->{Client}->{FramedGroupMaxPortsPerClassC});
# Compute octet 3 of the IP address
my $o3 = $base[2]
+ int($port / $p->{Client}->{FramedGroupMaxPortsPerClassC});
$rp->changeAttrByNum($Radius::Radius::FRAMED_IP_ADDRESS,
"$base[0].$base[1].$o3.$o4");
}
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.