Unsupported Vendor Specific Attribute results in incorrect behavior of rc_avpair_gen()

Amol Lad Amol.Lad at 4rf.com
Tue Jan 27 04:52:43 CET 2015

Ohh.. Thanks for pointing that out. Now the "users" file is as below:

abcd  Cleartext-Password := "xyz"
     Service-Type = Framed-Management,
    Management-Privilege-level  = 4,
    Cisco-AVPair = test

The problem is still there; as my embedded client does not recognize Cisco-AVPair and it is last in the list, rc_avpair_gen() returns NULL.

Why do you think return NULL from below is not wrong? Why should caller return NULL if rc_avpair_gen returns NULL?

        if (length != attrlen) {
                pair = rc_avpair_gen(rh, pair, ptr + attrlen, length - attrlen,
                if (pair == NULL)
                        return NULL;


-----Original Message-----
From: freeradius-users-bounces+amol.lad=4rf.com at lists.freeradius.org [mailto:freeradius-users-bounces+amol.lad=4rf.com at lists.freeradius.org] On Behalf Of Alan DeKok
Sent: Tuesday, 27 January 2015 4:32 p.m.
To: FreeRadius users mailing list
Subject: Re: Unsupported Vendor Specific Attribute results in incorrect behavior of rc_avpair_gen()

On Jan 26, 2015, at 10:24 PM, Amol Lad <Amol.Lad at 4rf.com> wrote:
> I've changed "Vendor-Specific = 4RF" but still same problem. Please note that, radius server shows vendor-specific=0x345246 (running with -X)

  Yes... 0x344246 is ASCII for "4RF".

  I think you're not clear on what "Vendor-Specific" is.  You NEVER specify a value for it directly.  Instead, you specify a VSA via the name of the VSA.  e.g. Cisco-AVPair.  The code will figure out it's a VSA, and do the correct encoding.

  Do NOT put ASCII values into a Vendor-Specific.  It's *always* wrong.

  Alan DeKok.

List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
The information in this email communication (inclusive of attachments) is confidential to 4RF Limited and the intended recipient(s). If you are not the intended recipient(s), please note that any use, disclosure, distribution or copying of this information or any part thereof is strictly prohibited and that the author accepts no liability for the consequences of any action taken on the basis of the information provided. If you have received this email in error, please notify the sender immediately by return email and then delete all instances of this email from your system. 4RF Limited will not accept responsibility for any consequences associated with the use of this email (including, but not limited to, damages sustained as a result of any viruses and/or any action or lack of action taken in reliance on it).

More information about the Freeradius-Users mailing list