returning a HEX String as a HEX String (bit string) instead ofthe decimal equivalent - FreeRADIUS 2.1.10

Franks Andy (RLZ) IT Systems Engineer Andy.Franks at sath.nhs.uk
Wed Aug 7 16:57:21 CEST 2013


Hi,
  Just agreeing with Arran really, we've got 5406 procurve switches,
which I believe are similar in software terms to the 2910s and we do the
unlang string Arran has presented here :
update reply {
	Egress-VLANID += "%{expr:822083584 + %{Tagged-VID}}"
}
It works fine, although that may not help you too much. I had some 2910s
around here somewhere, maybe I'll test one..
Thanks
Andy

-----Original Message-----
From:
freeradius-users-bounces+andy.franks=sath.nhs.uk at lists.freeradius.org
[mailto:freeradius-users-bounces+andy.franks=sath.nhs.uk at lists.freeradiu
s.org] On Behalf Of Arran Cudbard-Bell
Sent: 07 August 2013 14:06
To: FreeRadius users mailing list
Subject: Re: returning a HEX String as a HEX String (bit string) instead
ofthe decimal equivalent - FreeRADIUS 2.1.10


On 7 Aug 2013, at 13:46, Alan DeKok <aland at deployingradius.com> wrote:

> Arran Cudbard-Bell wrote:
>> I'm honestly not entirely sure why the freeradius dictionary has the 
>> attribute as an unsigned int
> 
>  That's what the RFCs say.  And the server doesn't really have a way 
> of packing arbitrary structures from attributes.


It says the value is 4 octets.  That's not quite saying it's an integer,
was there a later one?

I think it's arguably more useful as an integer though, for the reasons
listed previously, and because you can use expr to build the bit string
easily.

For example:

update reply {
	Egress-VLANID += "%{expr:822083584 + %{Tagged-VID}}"
}

With hex you need to manually pad the VID out to 12 bits.

Arran Cudbard-Bell <a.cudbardb at freeradius.org> FreeRADIUS Development
Team

-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list