How to Pass multiple Attribute Value Pair of Same Name.

Herwin Weststrate herwin at quarantainenet.nl
Tue Apr 28 08:59:33 CEST 2015


On 28-04-15 08:46, Amit Butere wrote:
> Hi Guys,
> i am using FreeRADIUS Version 3.0.3 and using perl module
> 
> when i pass single Attribute to perl script like ie. ( $RAD_CHECK{'
> Account-Info'} ) .i can get all the values of this variable available in
> the perl for processing.
> 
> but when i am trying to pass multiple variable of same name i am not
> getting those values pass to perl script.
> 
> in the DB i have following entries
> 
>   Account-Info = "AInternet-Sevice"
> 
>   Account-Info = "NBoD-2Meg"
> i gone through doc but i am missing something i guess kindly guide me what
> i am missing .

You get them as an arrayref, which means you can do things like this:

  for my $account_info (@{ $RAD_CHECK{'Account-Info'} }) {
    radiusd::radlog(L_DBG, "Account info value: $account_info");
  }

> also in previous version of radius 2.2.x . when using perl module i can
> simply print any variable with print command and variable name. how can i
> achieve same in this new version of radius.

The `radiusd::radlog` command (see the example above) prints to the log
of FreeRADIUS, but I'm not sure I understood this question correctly.

-- 
Herwin Weststrate


More information about the Freeradius-Users mailing list