Problem with Vendor ID greater then 32767
Arran Cudbard-Bell
A.Cudbard-Bell at sussex.ac.uk
Wed Aug 12 15:11:14 CEST 2009
On 12/08/2009 14:15, Rafael Ugolini wrote:
> ----- "Alan DeKok" <aland at deployingradius.com> wrote:
> | Arran Cudbard-Bell wrote:
> | > Did you not think they'd get past 32K? Int is dead, long live long :)
> |
> | I thought it would take longer than that...
> |
> | But the limitation in FreeRADIUS has been there for about 10 years...
> | I guess it's OK for IANA to take 10 years to allocate 32K vendor ID's.
> |
>
> Anyway, why would you guys use long if int in 32bit arch can go from
> −2,147,483,648 to 2,147,483,647 ?
Because int is ambiguous, it's not standardised across all compilers, and is only required to have a minimum signed value of -32767 and a maximum of 32767.
It's safer to use long, as it should always be at least 32bits.
Arran
--
Arran Cudbard-Bell <A.Cudbard-Bell at sussex.ac.uk>,
Systems Administrator (AAA),
Infrastructure Services (IT Services),
E1-1-08, Engineering 1, University Of Sussex, Brighton, BN1 9QT
DDI+FAX: +44 1273 873900 | INT: 3900
GPG: 86FF A285 1AA1 EE40 D228 7C2E 71A9 25BB 1E68 54A2
More information about the Freeradius-Devel
mailing list