cisco_vsa_hack

Joe Maimon jmaimon at ttec.com
Thu Jan 7 19:06:21 CET 2010


Does turning on the hack do anything to the attributes other than adding 
the value to matching defined attributes?

 From the code:

                 if ((vp->attribute & 0xffff) == 1) {
                         const char *p;
                         DICT_ATTR       *dattr;

                         p = vp->vp_strvalue;
                         gettoken(&p, newattr, sizeof(newattr));

                         if (((dattr = dict_attrbyname(newattr)) != NULL) &&
                             (dattr->type == PW_TYPE_STRING)) {
                                 VALUE_PAIR *newvp;

                                 /*
                                  *  Make a new attribute.
                                  */
                                 newvp = pairmake(newattr, ptr + 1, 
T_OP_EQ);
                                 if (newvp) {
                                         pairadd(&vp, newvp);
                                 }
                         }
                 } else {        /* h322-foo-bar = "h323-foo-bar = baz" */
                         /*
                          *      We strip out the duplicity from the
                          *      value field, we use only the value on
                          *      the right side of the '=' character.
                          */
                         strlcpy(newattr, ptr + 1, sizeof(newattr));
                         strlcpy((char *)vp->vp_strvalue, newattr,
                                 sizeof(vp->vp_strvalue));
                         vp->length = strlen((char *)vp->vp_strvalue);
                 }



More information about the Freeradius-Users mailing list