proxy DEFAULT realm bug-o-feature?

Stefan Winter stefan.winter at restena.lu
Tue Oct 17 07:43:25 CEST 2006


Hello,

> > > DEFAULT Realm != "NULL"
> > >         NAS-IP-Address := `%{Realm}`
> > >
> > > But instead of the expected result, I am observing:
> > >
> > >         NAS-IP-Address := 255.255.255.255
> >
> > You are assigning a string value to an attribute that carries an IP
> > address. Sounds like a less-than-perfect idea to me.
>
>   Actually, in my situation I know that realm will always be an IP
> address.  However when using the "realm DEFAULT {}" configuration, I
> want the Realm variable to be set to the IP address, but instead, it
> appears to be set to the word "DEFAULT".  So I am asking what is a way
> to overcome this bug (or feature, I'm still not sure which it is.)

It doesn't matter if the _string_ in realm happens to look like an IP address 
(which is a sort of _integer_). It is a different datatype, and assigning 
different datatypes is generally a bad idea.
This is neither a bug nor a feature. It's the way RADIUS works. You could code 
an explicit cast into the server if you really really want to. But I don't 
think you do.

My suggestion is to use NAS-Identifier: it is a string, and has otherwise a 
semantics very similar to NAS-IP-Address. You didn't mention why specifically 
you are forced to use NAS-IP-Address. So if you have no clear reason for 
that, use the string-based attribute NAS-Identifier.

Greetings,

Stefan

-- 
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de 
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: stefan.winter at restena.lu     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20061017/a9a50d97/attachment.pgp>


More information about the Freeradius-Devel mailing list