How can I output Cisco-AVPair Attributes in linelog?

David Mitchell mitchell at ucar.edu
Tue Oct 6 16:43:01 CEST 2009


Bob Franklin wrote:
> On Tue, 6 Oct 2009, Alan DeKok wrote:
> 
>>> Start = "Connect: User: %{User-Name} ( client: %{Calling-Station-Id}
>>> location: %{WISPr-Location-Name}) %{Cisco-AVPair[*]}"
>>>
>>> or the first one by using %{Cisco-AVPair[1]}. But I have no guarantee
>>> that the ssid will be the first AV pair.
>>
>>  Yes... there's no simple way to do that right now.
> 
> We do this:
> 
>     elsif ("%{Cisco-AVPair}" =~ /^ssid=(.+)$/) {
>         # a Cisco AP
> 
>         update request {
>             UCam-Location-Id := "%{NAS-IP-Address}"
>             UCam-Essid-Name := "%{1}"
>         }
> 
> [We use UCam-Essid-Name and UCam-Location-Id as local dictionary items
> to handle different types of APs by setting a common field.]
> 
> 
> I've never seen another Cisco-AVPair attribute (only 'ssid=xxx') -- what
> happens if there is and I'm doing the above?  Will it match the first
> (or an abitrary one) or will it find one which matches and return false
> if there if isn't?

That's a good question. I get about six AVPair's so I could test. What
portion of the config do you put that code into?

-David Mitchell

> 
>   - Bob
> 
> 


-- 
-----------------------------------------------------------------
| David Mitchell (mitchell at ucar.edu)       Network Engineer IV  |
| Tel: (303) 497-1845                      National Center for  |
| FAX: (303) 497-1818                      Atmospheric Research |
-----------------------------------------------------------------



More information about the Freeradius-Users mailing list