rlm_perl multiple attributes in rad_reply was: Adding Multiple Cisco-AVPairs using rlm_perl

Alexander Kubatkin kaa at kaa.su
Sat Aug 21 20:41:19 CEST 2010


В сообщении от Среда 20 января 2010 02:29:54 автор Bjørn Mork написал:
> James Nedila <jn at colonynetworks.com> writes:
> > I have a rlm_perl script where i'd like to return multiple Cisco-AVPair
> > attributes in an Access-Accept response.
> > 
> > Since rlm_perl is passed hashes for RAD_REQUEST, RAD_CHECK, and
> > RAD_REPLY, is there a way to pass an array as the value for the
> > Cisco-AVPair hash key? If not, is there another way to do this?
> 
> Use an array ref as value.  I.e
> 
> $RAD_REPLY{'Cisco-AVPair'} = [
>    'ip:inacl#1=permit udp any any eq 53',
>    'ip:inacl#2=permit tcp any any eq 80',
>    'ip:inacl#3=deny ip any any',
> ];
> 

This isn't working, i'm trying to put 2 dns-servers in dhcp configuration like 
this:
$RAD_REPLY{'DHCP-Domain-Name-Server'} = ["$ns1","$ns2"] ;

and in resolv.conf i see:
nameserver IP1 IP2

but i need
nameserver IP1
nameserver IP2

and if to talk about perl - where no way to have 2 one named key(attribute 
like DHCP-Domain-Name-Server ) in hash array, so must be other way to put 2 
dns-servers in rad_reply from rlm_perl, how to do this?

for now only one way - dhcp-site and 2 attributes in unlang condition.


> 
> Bjørn
> 


-- 
Alexander Kubatkin




More information about the Freeradius-Users mailing list