dictionary.rfc2865 discrepancy?
Hi all, With the stock dictionaries, when radiusd returns a Class, it's in hex, not as a string. Looking at the RFC, it looks to me like the dictionary is wrong. Can someone confirm this? # echo 'User-Name= "geoff", Password = "geoff", NAS-IP-Address = 127.0.0.1, NAS-Port = 1' | /opt/reverb/bin/radclient -d /opt/reverb/share/dictionary -x 127.0.0.1:1812 auth 1234test1234 Sending Access-Request of id 73 to 127.0.0.1 port 1812 User-Name = "geoff" Password = "geoff" NAS-IP-Address = 127.0.0.1 NAS-Port = 1 rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=73, length=57 Connect-Info = "OFFICE" Class = 0x4f523e404e4c2d5447 Filter-Id = "EMPLOYEE" If I change dictionary.rfc2865 as follows: -ATTRIBUTE Class 25 octets +ATTRIBUTE Class 25 string It works just fine (ie. I get back Class = "OU=MYCOMPANY.COM"). Am I misusing the class attribute (ie. should it not be a string?), or is the dictionary wrong? Thanks.
Geoff Silver <geoff+freeradius@uslinux.net> wrote:
With the stock dictionaries, when radiusd returns a Class, it's in hex, not as a string. Looking at the RFC, it looks to me like the dictionary is wrong. Can someone confirm this?
This has come up before. The type octets/string in the dictionary has *nothing* to do with what goes on the wire. All it affects is printing and parsing of configuration data on the server. And for historical reasons (on both sides), the RFC's use "string" to mean opaque binary data, where FreeRADIUS uses "octets" to mean that.
If I change dictionary.rfc2865 as follows:
-ATTRIBUTE Class 25 octets +ATTRIBUTE Class 25 string
It works just fine (ie. I get back Class = "OU=MYCOMPANY.COM"). Am I misusing the class attribute (ie. should it not be a string?), or is the dictionary wrong?
If you use Class like that, it works for you. But not everyone uses class like that. Some people send opaque binary strings in a Class attribute, and expect to see that data when it's printed, rather than weird characters with umlauts. Alan DeKok.
participants (2)
-
Alan DeKok -
Geoff Silver