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

Bjørn Mork bjorn at mork.no
Thu Aug 26 09:17:45 CEST 2010


Boian Jordanov <bjordanov at orbitel.bg> writes:
> On Aug 22, 2010, at 3:06 PM, Alexander Kubatkin wrote:
>
>> В сообщении от Воскресенье 22 августа 2010 10:48:56 автор Alan DeKok написал:
>>> Alexander Kubatkin wrote:
>>>> 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"] ;
>
> To return multiple items you have to use array ref.
>
> Try this way. 
>
> $data[0] = "nameserver_1";
> $data[1] = "nameserver_2";
>
> $data[2] = "nameserver_3";
>
> $data[3] = "nameserver_x";
>
>
> $RAD_REPLY{'DHCP-Domain-Name-Server'} = \@data;

Which should be equivalent to doing

$RAD_REPLY{'DHCP-Domain-Name-Server'} = ["nameserver_1", 
                                         "nameserver_2",
                                         "nameserver_3",
                                         "nameserver_x"];

so I don't think that's the problem. 

But we are all guessing, since we haven't yet seen the actual debug
output from FreeRADIUS, only selected bits and pieces of the non-working
end result.  

Since we *know* that FreeRADIUS and rlm_perl work when configured
correctly, we can deduce that there is "something" wrong with the
configuration.  I believe that's the best we can do, given the input
available to us.



Bjørn




More information about the Freeradius-Users mailing list