Inconsistent behaviour with duplicate dictionary entries

Brian Candler B.Candler at pobox.com
Mon Jun 18 14:13:24 CEST 2012


(freeradius 2.1.12)

I have noticed an inconsistency when there are duplicate dictionary entries
for the same attribute, in particular this one from dictionary.redback:

ATTRIBUTE	Qos-Policy-Metering			88	string
ATTRIBUTE	Qos-Metering-Profile-Name		88	string

When radtest/radclient is decoding response packets it uses the second entry
(this makes sense, it's the last entry read which takes precedence).

However the debug output from freeradius -X displays the first entry
instead.

Example:

    $ echo -e 'User-Name = "foo at example.com"\nCalling-Station-Id="12345678"\nNAS-IP-Address=255.255.255.244\n' | radclient localhost auth testing123
    Received response ID 166, code 2, length = 68
            Qos-Metering-Profile-Name = "24M_P"
            Double-Authentication = 1

but freeradius -X shows:

    ...
    Sending Access-Accept of id 67 to 127.0.0.1 port 42234
            Qos-Policy-Metering := "24M_P"
            Double-Authentication := 1
    Finished request 0.
    Going to the next request
    Waking up in 4.9 seconds.
    Cleaning up request 0 ID 67 with timestamp +2

This is only significant because I have a GUI wrapper with a radtest
function which displays the debug output.  This uses the control socket to
inject the packet, so I get slightly different output from freeradius -X,
but it also shows the first dictionary entry:

    ...
    Injected Access-Accept packet to host 127.0.0.1 port 0 code=2, id=3
            Qos-Policy-Metering := "24M_P"
            Double-Authentication := 1
    Finished request 3.
    Going to the next request
    Thread 44 waiting to be assigned a request

Anyway, this suggests to me that there may be two different code paths for
looking up attribute numbers to names; maybe they could be unified?

Regards,

Brian.


More information about the Freeradius-Devel mailing list